diff options
| author | Emmanuel Pescosta <[email protected]> | 2015-02-26 17:40:06 +0100 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2015-02-26 18:10:42 +0100 |
| commit | 832e157ecd1a1640b82425358b20fff416a2f8b7 (patch) | |
| tree | f7bd0c344151fe3ef6354ae410f9b45b3b7e0a10 /src/tests | |
| parent | 41424d010934e0a47958d0192c7c4de69ea3e955 (diff) | |
Port away from KDELibs4Support (we only use KDELibs4Support when baloo isn't present, because KFileMetaDataWidget is in KDELibs4Support)
Reviewed-By: Vishesh Handa
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/kfileitemlistviewtest.cpp | 2 | ||||
| -rw-r--r-- | src/tests/kfileitemmodelbenchmark.cpp | 10 | ||||
| -rw-r--r-- | src/tests/kfileitemmodeltest.cpp | 10 | ||||
| -rw-r--r-- | src/tests/kitemlistcontrollertest.cpp | 4 |
4 files changed, 15 insertions, 11 deletions
diff --git a/src/tests/kfileitemlistviewtest.cpp b/src/tests/kfileitemlistviewtest.cpp index 5c40abba3..cac4f7a58 100644 --- a/src/tests/kfileitemlistviewtest.cpp +++ b/src/tests/kfileitemlistviewtest.cpp @@ -56,7 +56,7 @@ void KFileItemListViewTest::init() m_graphicsView = new QGraphicsView(); m_graphicsView->show(); - QTest::qWaitForWindowShown(m_graphicsView); + QTest::qWaitForWindowExposed(m_graphicsView); } void KFileItemListViewTest::cleanup() diff --git a/src/tests/kfileitemmodelbenchmark.cpp b/src/tests/kfileitemmodelbenchmark.cpp index c970a7198..b73485efb 100644 --- a/src/tests/kfileitemmodelbenchmark.cpp +++ b/src/tests/kfileitemmodelbenchmark.cpp @@ -29,18 +29,20 @@ #include "testdir.h" -void myMessageOutput(QtMsgType type, const char* msg) +void myMessageOutput(QtMsgType type, const QMessageLogContext& context, const QString& msg) { + Q_UNUSED(context); + switch (type) { case QtDebugMsg: break; case QtWarningMsg: break; case QtCriticalMsg: - fprintf(stderr, "Critical: %s\n", msg); + fprintf(stderr, "Critical: %s\n", msg.toLocal8Bit().data()); break; case QtFatalMsg: - fprintf(stderr, "Fatal: %s\n", msg); + fprintf(stderr, "Fatal: %s\n", msg.toLocal8Bit().data()); abort(); default: break; @@ -317,7 +319,7 @@ void KFileItemModelBenchmark::insertManyChildItems() KFileItemList KFileItemModelBenchmark::createFileItemList(const QStringList& fileNames, const QString& prefix) { // Suppress 'file does not exist anymore' messages from KFileItemPrivate::init(). - qInstallMsgHandler(myMessageOutput); + qInstallMessageHandler(myMessageOutput); KFileItemList result; foreach (const QString& name, fileNames) { diff --git a/src/tests/kfileitemmodeltest.cpp b/src/tests/kfileitemmodeltest.cpp index cf50db02a..eba32e1e1 100644 --- a/src/tests/kfileitemmodeltest.cpp +++ b/src/tests/kfileitemmodeltest.cpp @@ -29,18 +29,20 @@ #include "kitemviews/private/kfileitemmodeldirlister.h" #include "testdir.h" -void myMessageOutput(QtMsgType type, const char* msg) +void myMessageOutput(QtMsgType type, const QMessageLogContext& context, const QString& msg) { + Q_UNUSED(context); + switch (type) { case QtDebugMsg: break; case QtWarningMsg: break; case QtCriticalMsg: - fprintf(stderr, "Critical: %s\n", msg); + fprintf(stderr, "Critical: %s\n", msg.toLocal8Bit().data()); break; case QtFatalMsg: - fprintf(stderr, "Fatal: %s\n", msg); + fprintf(stderr, "Fatal: %s\n", msg.toLocal8Bit().data()); abort(); default: break; @@ -107,7 +109,7 @@ void KFileItemModelTest::init() { // The item-model tests result in a huge number of debugging // output from kdelibs. Only show critical and fatal messages. - qInstallMsgHandler(myMessageOutput); + qInstallMessageHandler(myMessageOutput); qRegisterMetaType<KItemRange>("KItemRange"); qRegisterMetaType<KItemRangeList>("KItemRangeList"); diff --git a/src/tests/kitemlistcontrollertest.cpp b/src/tests/kitemlistcontrollertest.cpp index dafb9f854..e34731fa4 100644 --- a/src/tests/kitemlistcontrollertest.cpp +++ b/src/tests/kitemlistcontrollertest.cpp @@ -142,7 +142,7 @@ void KItemListControllerTest::initTestCase() QVERIFY(spyDirectoryLoadingCompleted.wait()); m_container->show(); - QTest::qWaitForWindowShown(m_container); + QTest::qWaitForWindowExposed(m_container); } void KItemListControllerTest::cleanupTestCase() @@ -460,7 +460,7 @@ void KItemListControllerTest::testKeyboardNavigation_data() selectionBehaviorNames[selectionBehavior] + ", " + groupingEnabledNames[groupingEnabled]; - const QByteArray testNameAscii = testName.toAscii(); + const QByteArray testNameAscii = testName.toLatin1(); QTest::newRow(testNameAscii.data()) << layout |
