tests: Don't omit the body of a test function with QT_BUILD_INTERNAL
Changing it outside of the test function definition to avoid running empty/inapplicable test functions. Change-Id: I713560cde7f715696984ed082d682900f5f1bcdd Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
This commit is contained in:
parent
6fd1895b91
commit
34cd8fd566
@ -58,8 +58,10 @@ private slots:
|
||||
void installMsgHandler();
|
||||
void installBothHandler();
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void cleanupFuncinfo_data();
|
||||
void cleanupFuncinfo();
|
||||
#endif
|
||||
|
||||
void qMessagePattern();
|
||||
|
||||
@ -326,11 +328,9 @@ public:
|
||||
};
|
||||
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_qmessagehandler::cleanupFuncinfo_data()
|
||||
{
|
||||
#ifndef QT_BUILD_INTERNAL
|
||||
QSKIP("Requires -developer-build");
|
||||
#endif
|
||||
QTest::addColumn<QString>("funcinfo");
|
||||
QTest::addColumn<QString>("expected");
|
||||
|
||||
@ -608,7 +608,9 @@ void tst_qmessagehandler::cleanupFuncinfo_data()
|
||||
|
||||
QTest::newRow("gcc_39")
|
||||
<< "int TestClass1::operator>(int)"
|
||||
<< "TestClass1::operator>";}
|
||||
<< "TestClass1::operator>";
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QT_BEGIN_NAMESPACE
|
||||
@ -616,16 +618,16 @@ extern QByteArray qCleanupFuncinfo(QByteArray);
|
||||
QT_END_NAMESPACE
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_qmessagehandler::cleanupFuncinfo()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QFETCH(QString, funcinfo);
|
||||
|
||||
// qDebug() << funcinfo.toLatin1();
|
||||
QByteArray result = qCleanupFuncinfo(funcinfo.toLatin1());
|
||||
QTEST(QString::fromLatin1(result), "expected");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_qmessagehandler::qMessagePattern()
|
||||
{
|
||||
|
@ -108,7 +108,9 @@ private slots:
|
||||
void iterateResource_data();
|
||||
void iterateResource();
|
||||
void stopLinkLoop();
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void engineWithNoIterator();
|
||||
#endif
|
||||
void absoluteFilePathsFromRelativeIteratorPath();
|
||||
void recurseWithFilters() const;
|
||||
void longPath();
|
||||
@ -478,17 +480,15 @@ public:
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QDirIterator::engineWithNoIterator()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
EngineWithNoIteratorHandler handler;
|
||||
|
||||
QDir("entrylist").entryList();
|
||||
QVERIFY(true); // test that the above line doesn't crash
|
||||
#else
|
||||
QSKIP("This test requires -developer-build.");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QDirIterator::absoluteFilePathsFromRelativeIteratorPath()
|
||||
{
|
||||
|
@ -178,7 +178,9 @@ private slots:
|
||||
void longFileName_data();
|
||||
void longFileName();
|
||||
void fileEngineHandler();
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void useQFileInAFileHandler();
|
||||
#endif
|
||||
void getCharFF();
|
||||
void remove_and_exists();
|
||||
void removeOpenFile();
|
||||
@ -2091,17 +2093,15 @@ public:
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QFile::useQFileInAFileHandler()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
// This test should not dead-lock
|
||||
MyRecursiveHandler handler;
|
||||
QFile file(":!tst_qfile.cpp");
|
||||
QVERIFY(file.exists());
|
||||
#else
|
||||
QSKIP("This test requires -developer-build.");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QFile::getCharFF()
|
||||
{
|
||||
|
@ -94,33 +94,21 @@ private slots:
|
||||
void setFallbacksEnabled_data();
|
||||
void fromFile_data();
|
||||
void fromFile();
|
||||
void setIniCodec();
|
||||
void testArrays_data();
|
||||
void testArrays();
|
||||
void testEscapes();
|
||||
void testCaseSensitivity_data();
|
||||
void testCaseSensitivity();
|
||||
void testErrorHandling_data();
|
||||
void testErrorHandling();
|
||||
void testIniParsing_data();
|
||||
void testIniParsing();
|
||||
void testChildKeysAndGroups_data();
|
||||
void testChildKeysAndGroups();
|
||||
void testUpdateRequestEvent();
|
||||
void testThreadSafety();
|
||||
void testNormalizedKey_data();
|
||||
void testNormalizedKey();
|
||||
void testEmptyData();
|
||||
void testResourceFiles();
|
||||
void fileName();
|
||||
void isWritable_data();
|
||||
void isWritable();
|
||||
void childGroups_data();
|
||||
void childGroups();
|
||||
void childKeys_data();
|
||||
void childKeys();
|
||||
void allKeys_data();
|
||||
void allKeys();
|
||||
void registerFormat();
|
||||
void setPath();
|
||||
void setDefaultFormat();
|
||||
@ -132,8 +120,22 @@ private slots:
|
||||
void consistentRegistryStorage();
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void allKeys_data();
|
||||
void allKeys();
|
||||
void childGroups_data();
|
||||
void childGroups();
|
||||
void childKeys_data();
|
||||
void childKeys();
|
||||
void setIniCodec();
|
||||
void testIniParsing_data();
|
||||
void testIniParsing();
|
||||
void testEscapes();
|
||||
void testNormalizedKey_data();
|
||||
void testNormalizedKey();
|
||||
void testVariantTypes_data();
|
||||
void testVariantTypes();
|
||||
#endif
|
||||
void rainersSyncBugOnMac_data();
|
||||
void rainersSyncBugOnMac();
|
||||
void recursionBug();
|
||||
@ -664,7 +666,6 @@ void tst_QSettings::testErrorHandling_data()
|
||||
|
||||
void tst_QSettings::testErrorHandling()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
#ifdef Q_OS_WIN
|
||||
QSKIP("Windows doesn't support most file modes, including read-only directories, so this test is moot.");
|
||||
#elif defined(Q_OS_UNIX)
|
||||
@ -730,12 +731,12 @@ void tst_QSettings::testErrorHandling()
|
||||
QCOMPARE((int)settings.status(), statusAfterSetAndSync);
|
||||
}
|
||||
#endif // !Q_OS_WIN
|
||||
#endif
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(QVariant)
|
||||
Q_DECLARE_METATYPE(QSettings::Status)
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QSettings::testIniParsing_data()
|
||||
{
|
||||
QTest::addColumn<QByteArray>("inicontent");
|
||||
@ -773,10 +774,11 @@ void tst_QSettings::testIniParsing_data()
|
||||
QTest::newRow("nonterm20") << QByteArray("v=x ") << "v" << QVariant("x") << QSettings::NoError;
|
||||
QTest::newRow("nonterm21") << QByteArray("v=x ;") << "v" << QVariant("x") << QSettings::NoError;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QSettings::testIniParsing()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
qRegisterMetaType<QVariant>("QVariant");
|
||||
qRegisterMetaType<QSettings::Status>("QSettings::Status");
|
||||
|
||||
@ -810,8 +812,8 @@ void tst_QSettings::testIniParsing()
|
||||
}
|
||||
|
||||
QCOMPARE(settings.status(), status);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
Tests beginGroup(), endGroup(), and group().
|
||||
@ -1012,14 +1014,16 @@ void tst_QSettings::setValue()
|
||||
QCOMPARE(settings.value("key 4").toMap(), map);
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QSettings::testVariantTypes_data()
|
||||
{
|
||||
populateWithFormats();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QSettings::testVariantTypes()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
#define testVal(key, val, tp, rtype) \
|
||||
{ \
|
||||
QSettings settings1(format, QSettings::UserScope, "software.org", "KillerAPP"); \
|
||||
@ -1103,8 +1107,8 @@ void tst_QSettings::testVariantTypes()
|
||||
}
|
||||
|
||||
#undef testVal
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QSettings::remove()
|
||||
{
|
||||
@ -1733,6 +1737,7 @@ void tst_QSettings::testThreadSafety()
|
||||
QCOMPARE(numThreadSafetyFailures, 0);
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QSettings::testNormalizedKey_data()
|
||||
{
|
||||
QTest::addColumn<QString>("inKey");
|
||||
@ -1762,10 +1767,11 @@ void tst_QSettings::testNormalizedKey_data()
|
||||
QTest::newRow("ab7") << "/aaa///bbb/" << "aaa/bbb";
|
||||
QTest::newRow("ab8") << "////aaa///bbb////" << "aaa/bbb";
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QSettings::testNormalizedKey()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QFETCH(QString, inKey);
|
||||
QFETCH(QString, outKey);
|
||||
|
||||
@ -1786,8 +1792,8 @@ void tst_QSettings::testNormalizedKey()
|
||||
QVERIFY(result.isDetached());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QSettings::testEmptyData()
|
||||
{
|
||||
@ -1941,9 +1947,9 @@ void tst_QSettings::fromFile()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QSettings::setIniCodec()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QByteArray expeContents4, expeContents5;
|
||||
QByteArray actualContents4, actualContents5;
|
||||
|
||||
@ -2006,8 +2012,8 @@ void tst_QSettings::setIniCodec()
|
||||
QCOMPARE(settings4.allKeys().first(), settings5.allKeys().first());
|
||||
QCOMPARE(settings4.value(settings4.allKeys().first()).toString(),
|
||||
settings5.value(settings5.allKeys().first()).toString());
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool containsSubList(QStringList mom, QStringList son)
|
||||
{
|
||||
@ -2359,9 +2365,9 @@ QString escapeWeirdChars(const QString &s)
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QSettings::testEscapes()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QSettings settings(QSettings::UserScope, "software.org", "KillerAPP");
|
||||
|
||||
#define testEscapedKey(plainKey, escKey) \
|
||||
@ -2483,8 +2489,8 @@ void tst_QSettings::testEscapes()
|
||||
testBadEscape("@Rect)", "@Rect)");
|
||||
testBadEscape("@Rect(1 2 3)", "@Rect(1 2 3)");
|
||||
testBadEscape("@@Rect(1 2 3)", "@Rect(1 2 3)");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QSettings::testCaseSensitivity_data()
|
||||
{
|
||||
@ -2685,14 +2691,16 @@ void tst_QSettings::isWritable()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QSettings::childGroups_data()
|
||||
{
|
||||
populateWithFormats();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QSettings::childGroups()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QFETCH(QSettings::Format, format);
|
||||
|
||||
{
|
||||
@ -2746,17 +2754,19 @@ void tst_QSettings::childGroups()
|
||||
|
||||
QCOMPARE(settings.childGroups(), QStringList() << "alpha" << "gamma" << "omicron" << "zeta");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QSettings::childKeys_data()
|
||||
{
|
||||
populateWithFormats();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QSettings::childKeys()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QFETCH(QSettings::Format, format);
|
||||
|
||||
{
|
||||
@ -2810,17 +2820,19 @@ void tst_QSettings::childKeys()
|
||||
|
||||
QCOMPARE(settings.childKeys(), QStringList() << "alpha" << "beta" << "gamma");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QSettings::allKeys_data()
|
||||
{
|
||||
populateWithFormats();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QSettings::allKeys()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QFETCH(QSettings::Format, format);
|
||||
|
||||
QStringList allKeys;
|
||||
@ -2869,8 +2881,8 @@ void tst_QSettings::allKeys()
|
||||
|
||||
QCOMPARE(settings.allKeys(), allKeys);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QSettings::registerFormat()
|
||||
{
|
||||
|
@ -75,12 +75,14 @@ class tst_QUrlInternal : public QObject
|
||||
|
||||
private Q_SLOTS:
|
||||
// IDNA internals
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void idna_testsuite_data();
|
||||
void idna_testsuite();
|
||||
void nameprep_testsuite_data();
|
||||
void nameprep_testsuite();
|
||||
void nameprep_highcodes_data();
|
||||
void nameprep_highcodes();
|
||||
#endif
|
||||
void ace_testsuite_data();
|
||||
void ace_testsuite();
|
||||
void std3violations_data();
|
||||
@ -100,6 +102,7 @@ private Q_SLOTS:
|
||||
};
|
||||
#include "tst_qurlinternal.moc"
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QUrlInternal::idna_testsuite_data()
|
||||
{
|
||||
QTest::addColumn<int>("numchars");
|
||||
@ -244,10 +247,11 @@ void tst_QUrlInternal::idna_testsuite_data()
|
||||
<< QByteArray(IDNA_ACE_PREFIX "b1abfaaepdrnnbgefbadotcwatmq2g4l")
|
||||
<< 0 << 0 << IDNA_SUCCESS << IDNA_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QUrlInternal::idna_testsuite()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QFETCH(int, numchars);
|
||||
QFETCH(ushortarray, unicode);
|
||||
QFETCH(QByteArray, punycode);
|
||||
@ -256,9 +260,10 @@ void tst_QUrlInternal::idna_testsuite()
|
||||
qt_punycodeEncoder((QChar*)unicode.points, numchars, &result);
|
||||
QCOMPARE(result.toLatin1(), punycode);
|
||||
QCOMPARE(qt_punycodeDecoder(result), QString::fromUtf16(unicode.points, numchars));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QUrlInternal::nameprep_testsuite_data()
|
||||
{
|
||||
QTest::addColumn<QString>("in");
|
||||
@ -498,10 +503,11 @@ void tst_QUrlInternal::nameprep_testsuite_data()
|
||||
"\xe3\x83\xbc\xe3\x83\x88")
|
||||
<< QString() << 0 << 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QUrlInternal::nameprep_testsuite()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QFETCH(QString, in);
|
||||
QFETCH(QString, out);
|
||||
QFETCH(QString, profile);
|
||||
@ -514,9 +520,10 @@ void tst_QUrlInternal::nameprep_testsuite()
|
||||
"Investigate further", Continue);
|
||||
qt_nameprep(&in, 0);
|
||||
QCOMPARE(in, out);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QUrlInternal::nameprep_highcodes_data()
|
||||
{
|
||||
QTest::addColumn<QString>("in");
|
||||
@ -550,18 +557,19 @@ void tst_QUrlInternal::nameprep_highcodes_data()
|
||||
<< QString() << 0 << 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QUrlInternal::nameprep_highcodes()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QFETCH(QString, in);
|
||||
QFETCH(QString, out);
|
||||
QFETCH(QString, profile);
|
||||
|
||||
qt_nameprep(&in, 0);
|
||||
QCOMPARE(in, out);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QUrlInternal::ace_testsuite_data()
|
||||
{
|
||||
|
@ -98,7 +98,9 @@ class tst_QStateMachine : public QObject
|
||||
private slots:
|
||||
void rootState();
|
||||
void machineWithParent();
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void addAndRemoveState();
|
||||
#endif
|
||||
void stateEntryAndExit();
|
||||
void assignProperty();
|
||||
void assignPropertyWithAnimation();
|
||||
@ -1107,9 +1109,9 @@ void tst_QStateMachine::machineWithParent()
|
||||
QCOMPARE(machine->parentState(), static_cast<QState*>(0));
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QStateMachine::addAndRemoveState()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QStateMachine machine;
|
||||
QStatePrivate *root_d = QStatePrivate::get(&machine);
|
||||
QCOMPARE(root_d->childStates().size(), 0);
|
||||
@ -1170,8 +1172,8 @@ void tst_QStateMachine::addAndRemoveState()
|
||||
delete s2;
|
||||
// ### how to deal with this?
|
||||
// machine.removeState(machine.errorState());
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QStateMachine::stateEntryAndExit()
|
||||
{
|
||||
|
@ -131,7 +131,9 @@ private slots:
|
||||
void useCase3();
|
||||
|
||||
void rootItemFlags();
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void treeDragAndDrop();
|
||||
#endif
|
||||
void removeRowsAndColumns();
|
||||
|
||||
void itemRoleNames();
|
||||
@ -1471,9 +1473,9 @@ struct FriendlyTreeView : public QTreeView
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QStandardItemModel::treeDragAndDrop()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
const int nRow = 5;
|
||||
const int nCol = 3;
|
||||
|
||||
@ -1611,8 +1613,8 @@ void tst_QStandardItemModel::treeDragAndDrop()
|
||||
|
||||
QVERIFY(compareModels(&model, &checkModel));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QStandardItemModel::removeRowsAndColumns()
|
||||
{
|
||||
|
@ -131,7 +131,9 @@ private slots:
|
||||
void parseString();
|
||||
void fromString_data();
|
||||
void fromString();
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void ensureSorted();
|
||||
#endif
|
||||
void standardKeys_data();
|
||||
void standardKeys();
|
||||
void keyBindings();
|
||||
@ -299,9 +301,9 @@ void tst_QKeySequence::checkMultipleCodes()
|
||||
* We must ensure that the keyBindings data is always sorted
|
||||
* so that we can safely perform binary searches.
|
||||
*/
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QKeySequence::ensureSorted()
|
||||
{
|
||||
#if defined(QT_BUILD_INTERNAL)
|
||||
uint N = QKeySequencePrivate::numberOfKeyBindings;
|
||||
uint val = QKeySequencePrivate::keyBindings[0].shortcut;
|
||||
for ( uint i = 1 ; i < N ; ++i) {
|
||||
@ -311,8 +313,8 @@ void tst_QKeySequence::ensureSorted()
|
||||
QVERIFY(nextval >= val);
|
||||
val = nextval;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QKeySequence::standardKeys_data()
|
||||
{
|
||||
|
@ -96,8 +96,10 @@ private slots:
|
||||
|
||||
void regionFromPath();
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void regionToPath_data();
|
||||
void regionToPath();
|
||||
#endif
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(QPolygon)
|
||||
@ -910,6 +912,7 @@ void tst_QRegion::regionFromPath()
|
||||
|
||||
Q_DECLARE_METATYPE(QPainterPath)
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QRegion::regionToPath_data()
|
||||
{
|
||||
QTest::addColumn<QPainterPath>("path");
|
||||
@ -957,6 +960,7 @@ void tst_QRegion::regionToPath_data()
|
||||
QTest::newRow("Grid") << path;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QT_BEGIN_NAMESPACE
|
||||
@ -964,9 +968,9 @@ extern QPainterPath qt_regionToPath(const QRegion ®ion);
|
||||
QT_END_NAMESPACE
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QRegion::regionToPath()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
|
||||
QFETCH(QPainterPath, path);
|
||||
|
||||
@ -1001,8 +1005,8 @@ void tst_QRegion::regionToPath()
|
||||
QCOMPARE(ia, ib);
|
||||
QCOMPARE(a.boundingRect(), b.boundingRect());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
QTEST_MAIN(tst_QRegion)
|
||||
#include "tst_qregion.moc"
|
||||
|
@ -297,13 +297,17 @@ private Q_SLOTS:
|
||||
|
||||
void httpCanReadLine();
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void rateControl_data();
|
||||
void rateControl();
|
||||
#endif
|
||||
|
||||
void downloadProgress_data();
|
||||
void downloadProgress();
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void uploadProgress_data();
|
||||
void uploadProgress();
|
||||
#endif
|
||||
|
||||
void chaining_data();
|
||||
void chaining();
|
||||
@ -399,12 +403,14 @@ private Q_SLOTS:
|
||||
void ftpAuthentication_data();
|
||||
void ftpAuthentication();
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void backgroundRequest_data();
|
||||
void backgroundRequest();
|
||||
void backgroundRequestInterruption_data();
|
||||
void backgroundRequestInterruption();
|
||||
void backgroundRequestConnectInBackground_data();
|
||||
void backgroundRequestConnectInBackground();
|
||||
#endif
|
||||
|
||||
// NOTE: This test must be last!
|
||||
void parentingRepliesToTheApp();
|
||||
@ -4670,6 +4676,7 @@ void tst_QNetworkReply::httpCanReadLine()
|
||||
QVERIFY(!reply->canReadLine());
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QNetworkReply::rateControl_data()
|
||||
{
|
||||
QTest::addColumn<int>("rate");
|
||||
@ -4682,7 +4689,9 @@ void tst_QNetworkReply::rateControl_data()
|
||||
QTest::newRow("250") << 250;
|
||||
QTest::newRow("1024") << 1024;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QNetworkReply::rateControl()
|
||||
{
|
||||
QSKIP("Test disabled -- only for manual purposes");
|
||||
@ -4690,10 +4699,6 @@ void tst_QNetworkReply::rateControl()
|
||||
// faster than the data is being consumed.
|
||||
QFETCH(int, rate);
|
||||
|
||||
#if !defined(QT_BUILD_INTERNAL)
|
||||
QSKIP("backend for testing not available!");
|
||||
#endif
|
||||
|
||||
// ask for 20 seconds worth of data
|
||||
FastSender sender(20 * rate * 1024);
|
||||
|
||||
@ -4731,6 +4736,7 @@ void tst_QNetworkReply::rateControl()
|
||||
QVERIFY(sender.transferRate >= minRate);
|
||||
QVERIFY(sender.transferRate <= maxRate);
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QNetworkReply::downloadProgress_data()
|
||||
{
|
||||
@ -4803,17 +4809,17 @@ void tst_QNetworkReply::downloadProgress()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QNetworkReply::uploadProgress_data()
|
||||
{
|
||||
putToFile_data();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QNetworkReply::uploadProgress()
|
||||
{
|
||||
QFETCH(QByteArray, data);
|
||||
#if !defined(QT_BUILD_INTERNAL)
|
||||
QSKIP("backend for testing not available!");
|
||||
#endif
|
||||
QTcpServer server;
|
||||
QVERIFY(server.listen());
|
||||
|
||||
@ -4843,6 +4849,7 @@ void tst_QNetworkReply::uploadProgress()
|
||||
QCOMPARE(args.at(0).toInt(), data.size());
|
||||
QCOMPARE(args.at(1).toInt(), data.size());
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QNetworkReply::chaining_data()
|
||||
{
|
||||
@ -6822,6 +6829,7 @@ void tst_QNetworkReply::ftpAuthentication()
|
||||
QCOMPARE(reply->error(), QNetworkReply::NetworkError(error));
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QNetworkReply::backgroundRequest_data()
|
||||
{
|
||||
QTest::addColumn<QUrl>("url");
|
||||
@ -6851,11 +6859,12 @@ void tst_QNetworkReply::backgroundRequest_data()
|
||||
QTest::newRow("ftp, bg, nobg") << ftpurl << true << (int)QNetworkSession::NoBackgroundTrafficPolicy << QNetworkReply::BackgroundRequestNotAllowedError;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
//test purpose: background requests can't be started when not allowed
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QNetworkReply::backgroundRequest()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
#ifndef QT_NO_BEARERMANAGEMENT
|
||||
QFETCH(QUrl, url);
|
||||
QFETCH(bool, background);
|
||||
@ -6889,9 +6898,10 @@ void tst_QNetworkReply::backgroundRequest()
|
||||
QVERIFY(reply->isFinished());
|
||||
QCOMPARE(reply->error(), error);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QNetworkReply::backgroundRequestInterruption_data()
|
||||
{
|
||||
QTest::addColumn<QUrl>("url");
|
||||
@ -6914,11 +6924,12 @@ void tst_QNetworkReply::backgroundRequestInterruption_data()
|
||||
QTest::newRow("ftp, bg, nobg") << ftpurl << true << QNetworkReply::BackgroundRequestNotAllowedError;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
//test purpose: background requests in progress are aborted when policy changes to disallow them
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QNetworkReply::backgroundRequestInterruption()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
#ifndef QT_NO_BEARERMANAGEMENT
|
||||
QFETCH(QUrl, url);
|
||||
QFETCH(bool, background);
|
||||
@ -6961,9 +6972,10 @@ void tst_QNetworkReply::backgroundRequestInterruption()
|
||||
QVERIFY(reply->isFinished());
|
||||
QCOMPARE(reply->error(), error);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QNetworkReply::backgroundRequestConnectInBackground_data()
|
||||
{
|
||||
QTest::addColumn<QUrl>("url");
|
||||
@ -6978,11 +6990,12 @@ void tst_QNetworkReply::backgroundRequestConnectInBackground_data()
|
||||
QTest::newRow("ftp, fg") << ftpurl << false;
|
||||
QTest::newRow("ftp, bg") << ftpurl << true;
|
||||
}
|
||||
#endif
|
||||
|
||||
//test purpose: check that backgroundness is propagated to the network session
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QNetworkReply::backgroundRequestConnectInBackground()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
#ifndef QT_NO_BEARERMANAGEMENT
|
||||
QFETCH(QUrl, url);
|
||||
QFETCH(bool, background);
|
||||
@ -7023,8 +7036,8 @@ void tst_QNetworkReply::backgroundRequestConnectInBackground()
|
||||
|
||||
QVERIFY(reply->isFinished());
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
// NOTE: This test must be last testcase in tst_qnetworkreply!
|
||||
void tst_QNetworkReply::parentingRepliesToTheApp()
|
||||
|
@ -72,7 +72,12 @@ public:
|
||||
private slots:
|
||||
void initTestCase();
|
||||
void getSetCheck();
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void qglContextDefaultBindTexture();
|
||||
void openGLVersionCheck();
|
||||
void shareRegister();
|
||||
void textureCleanup();
|
||||
#endif
|
||||
void graphicsViewClipping();
|
||||
void partialGLWidgetUpdates_data();
|
||||
void partialGLWidgetUpdates();
|
||||
@ -91,9 +96,6 @@ private slots:
|
||||
void replaceClipping();
|
||||
void clipTest();
|
||||
void destroyFBOAfterContext();
|
||||
void shareRegister();
|
||||
void qglContextDefaultBindTexture();
|
||||
void textureCleanup();
|
||||
void threadImages();
|
||||
void nullRectCrash();
|
||||
};
|
||||
@ -654,9 +656,9 @@ extern QGLFormat::OpenGLVersionFlags qOpenGLVersionFlagsFromString(const QString
|
||||
QT_END_NAMESPACE
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QGL::openGLVersionCheck()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QString versionString;
|
||||
QGLFormat::OpenGLVersionFlags expectedFlag;
|
||||
QGLFormat::OpenGLVersionFlags versionFlag;
|
||||
@ -751,8 +753,8 @@ void tst_QGL::openGLVersionCheck()
|
||||
#else
|
||||
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_1);
|
||||
#endif //defined(QT_OPENGL_ES_1)
|
||||
#endif //QT_BUILD_INTERNAL
|
||||
}
|
||||
#endif //QT_BUILD_INTERNAL
|
||||
|
||||
static bool fuzzyComparePixels(const QRgb testPixel, const QRgb refPixel, const char* file, int line, int x = -1, int y = -1)
|
||||
{
|
||||
@ -1817,12 +1819,12 @@ int tst_QGLResource::deletions = 0;
|
||||
#ifdef TODO
|
||||
Q_GLOBAL_STATIC(QOpenGLContextGroupResource<tst_QGLResource>, qt_shared_test)
|
||||
#endif //TODO
|
||||
#endif
|
||||
#endif // QT_BUILD_INTERNAL
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QGL::shareRegister()
|
||||
{
|
||||
#ifdef TODO
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
// Create a context.
|
||||
QGLWidget *glw1 = new QGLWidget();
|
||||
glw1->makeCurrent();
|
||||
@ -1932,14 +1934,14 @@ void tst_QGL::shareRegister()
|
||||
QVERIFY(guard.id() == 0);
|
||||
QVERIFY(guard3.context() == 0);
|
||||
QVERIFY(guard3.id() == 0);
|
||||
#endif
|
||||
#endif //TODO
|
||||
}
|
||||
#endif
|
||||
|
||||
// Tests QGLContext::bindTexture with default options
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QGL::qglContextDefaultBindTexture()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QGLWidget w;
|
||||
w.makeCurrent();
|
||||
QGLContext *ctx = const_cast<QGLContext*>(w.context());
|
||||
@ -1981,12 +1983,12 @@ void tst_QGL::qglContextDefaultBindTexture()
|
||||
ctx->deleteTexture(boundPixmapTextureId);
|
||||
QCOMPARE((bool)glIsTexture(boundImageTextureId), GL_FALSE);
|
||||
QCOMPARE((bool)glIsTexture(boundPixmapTextureId), GL_FALSE);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QGL::textureCleanup()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QGLWidget w;
|
||||
w.resize(200,200);
|
||||
w.show();
|
||||
@ -2176,8 +2178,8 @@ void tst_QGL::textureCleanup()
|
||||
|
||||
copyOfPixmap = QPixmap();
|
||||
QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace ThreadImages {
|
||||
|
||||
|
@ -101,7 +101,9 @@ public slots:
|
||||
|
||||
private slots:
|
||||
void currentChangedSignal();
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void directoryEnteredSignal();
|
||||
#endif
|
||||
void filesSelectedSignal_data();
|
||||
void filesSelectedSignal();
|
||||
void filterSelectedSignal();
|
||||
@ -141,8 +143,10 @@ private slots:
|
||||
void enableChooseButton();
|
||||
void hooks();
|
||||
#ifdef Q_OS_UNIX
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tildeExpansion_data();
|
||||
void tildeExpansion();
|
||||
#endif // QT_BUILD_INTERNAL
|
||||
#endif
|
||||
|
||||
private:
|
||||
@ -213,9 +217,9 @@ void tst_QFiledialog::currentChangedSignal()
|
||||
}
|
||||
|
||||
// only emitted from the views, sidebar, or lookin combo
|
||||
#if defined QT_BUILD_INTERNAL
|
||||
void tst_QFiledialog::directoryEnteredSignal()
|
||||
{
|
||||
#if defined QT_BUILD_INTERNAL
|
||||
QNonNativeFileDialog fd(0, "", QDir::root().path());
|
||||
fd.setOptions(QFileDialog::DontUseNativeDialog);
|
||||
fd.show();
|
||||
@ -259,8 +263,8 @@ void tst_QFiledialog::directoryEnteredSignal()
|
||||
QTest::mouseDClick(listView->viewport(), Qt::LeftButton, 0, listView->visualRect(folder).center());
|
||||
QTRY_COMPARE(spyDirectoryEntered.count(), 1);
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
Q_DECLARE_METATYPE(QFileDialog::FileMode)
|
||||
void tst_QFiledialog::filesSelectedSignal_data()
|
||||
@ -1313,6 +1317,7 @@ void tst_QFiledialog::hooks()
|
||||
}
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QFiledialog::tildeExpansion_data()
|
||||
{
|
||||
QTest::addColumn<QString>("tildePath");
|
||||
@ -1328,18 +1333,17 @@ void tst_QFiledialog::tildeExpansion_data()
|
||||
QString invalid = QString::fromLatin1("~thisIsNotAValidUserName");
|
||||
QTest::newRow("invalid user name") << invalid << invalid;
|
||||
}
|
||||
#endif // QT_BUILD_INTERNAL
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QFiledialog::tildeExpansion()
|
||||
{
|
||||
#ifndef QT_BUILD_INTERNAL
|
||||
QSKIP("Test case relies on developer build (AUTOTEST_EXPORT)");
|
||||
#else
|
||||
QFETCH(QString, tildePath);
|
||||
QFETCH(QString, expandedPath);
|
||||
|
||||
QCOMPARE(qt_tildeExpansion(tildePath), expandedPath);
|
||||
#endif
|
||||
}
|
||||
#endif // QT_BUILD_INTERNAL
|
||||
#endif
|
||||
|
||||
QTEST_MAIN(tst_QFiledialog)
|
||||
|
@ -99,9 +99,16 @@ public slots:
|
||||
void cleanup();
|
||||
|
||||
private slots:
|
||||
void listRoot();
|
||||
void heapCorruption();
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void deleteDirAndFiles();
|
||||
void listRoot();
|
||||
void task227304_proxyOnFileDialog();
|
||||
void task236402_dontWatchDeletedDir();
|
||||
void task251321_sideBarHiddenEntries();
|
||||
void task251341_sideBarRemoveEntries();
|
||||
void task257579_sideBarWithNonCleanUrls();
|
||||
#endif
|
||||
void heapCorruption();
|
||||
void filter();
|
||||
void showNameFilterDetails();
|
||||
void unc();
|
||||
@ -110,7 +117,6 @@ private slots:
|
||||
void task178897_minimumSize();
|
||||
void task180459_lastDirectory_data();
|
||||
void task180459_lastDirectory();
|
||||
void task227304_proxyOnFileDialog();
|
||||
void task227930_correctNavigationKeyboardBehavior();
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
|
||||
void task226366_lowerCaseHardDriveWindows();
|
||||
@ -118,15 +124,11 @@ private slots:
|
||||
void completionOnLevelAfterRoot();
|
||||
void task233037_selectingDirectory();
|
||||
void task235069_hideOnEscape();
|
||||
void task236402_dontWatchDeletedDir();
|
||||
void task203703_returnProperSeparator();
|
||||
void task228844_ensurePreviousSorting();
|
||||
void task239706_editableFilterCombo();
|
||||
void task218353_relativePaths();
|
||||
void task251321_sideBarHiddenEntries();
|
||||
void task251341_sideBarRemoveEntries();
|
||||
void task254490_selectFileMultipleTimes();
|
||||
void task257579_sideBarWithNonCleanUrls();
|
||||
void task259105_filtersCornerCases();
|
||||
|
||||
void QTBUG4419_lineEditSelectAll();
|
||||
@ -176,9 +178,9 @@ void tst_QFileDialog2::cleanup()
|
||||
settings.setValue(QLatin1String("filedialog"), userSettings);
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QFileDialog2::listRoot()
|
||||
{
|
||||
#if defined QT_BUILD_INTERNAL
|
||||
QFileInfoGatherer fileInfoGatherer;
|
||||
fileInfoGatherer.start();
|
||||
QTest::qWait(1500);
|
||||
@ -194,8 +196,8 @@ void tst_QFileDialog2::listRoot()
|
||||
QTest::qWait(500);
|
||||
#endif
|
||||
QCOMPARE(qt_test_isFetchedRoot(),true);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QFileDialog2::heapCorruption()
|
||||
{
|
||||
@ -214,9 +216,9 @@ struct FriendlyQFileDialog : public QNonNativeFileDialog
|
||||
};
|
||||
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QFileDialog2::deleteDirAndFiles()
|
||||
{
|
||||
#if defined QT_BUILD_INTERNAL
|
||||
QString tempPath = tempDir.path() + "/QFileDialogTestDir4FullDelete";
|
||||
QDir dir;
|
||||
QVERIFY(dir.mkpath(tempPath + "/foo"));
|
||||
@ -243,8 +245,8 @@ void tst_QFileDialog2::deleteDirAndFiles()
|
||||
QFileInfo info(tempPath);
|
||||
QTest::qWait(2000);
|
||||
QVERIFY(!info.exists());
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QFileDialog2::filter()
|
||||
{
|
||||
@ -453,9 +455,9 @@ QString &dir, const QString &filter)
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QFileDialog2::task227304_proxyOnFileDialog()
|
||||
{
|
||||
#if defined QT_BUILD_INTERNAL
|
||||
QNonNativeFileDialog fd(0, "", QDir::currentPath(), 0);
|
||||
fd.setProxyModel(new FilterDirModel(QDir::currentPath()));
|
||||
fd.show();
|
||||
@ -489,8 +491,8 @@ void tst_QFileDialog2::task227304_proxyOnFileDialog()
|
||||
QTest::mouseClick(sidebar->viewport(), Qt::LeftButton, 0, sidebar->visualRect(sidebar->model()->index(1, 0)).center());
|
||||
QTest::qWait(250);
|
||||
//We shouldn't crash
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QFileDialog2::task227930_correctNavigationKeyboardBehavior()
|
||||
{
|
||||
@ -670,9 +672,9 @@ void tst_QFileDialog2::task235069_hideOnEscape()
|
||||
QCOMPARE(fd2.isVisible(), false);
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QFileDialog2::task236402_dontWatchDeletedDir()
|
||||
{
|
||||
#if defined QT_BUILD_INTERNAL
|
||||
//THIS TEST SHOULD NOT DISPLAY WARNINGS
|
||||
QDir current = QDir::currentPath();
|
||||
//make sure it is the first on the list
|
||||
@ -692,8 +694,8 @@ void tst_QFileDialog2::task236402_dontWatchDeletedDir()
|
||||
QTest::qWait(200);
|
||||
fd.d_func()->removeDirectory(current.absolutePath() + "/aaaaaaaaaa/");
|
||||
QTest::qWait(1000);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QFileDialog2::task203703_returnProperSeparator()
|
||||
{
|
||||
@ -862,9 +864,9 @@ void tst_QFileDialog2::task218353_relativePaths()
|
||||
appDir.rmdir("test");
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QFileDialog2::task251321_sideBarHiddenEntries()
|
||||
{
|
||||
#if defined QT_BUILD_INTERNAL
|
||||
QNonNativeFileDialog fd;
|
||||
|
||||
QDir current = QDir::currentPath();
|
||||
@ -899,8 +901,8 @@ void tst_QFileDialog2::task251321_sideBarHiddenEntries()
|
||||
hiddenSubDir.rmdir("happy");
|
||||
hiddenDir.rmdir("subdir");
|
||||
current.rmdir(".hidden");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined QT_BUILD_INTERNAL
|
||||
class MyQSideBar : public QSidebar
|
||||
@ -922,9 +924,9 @@ public :
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QFileDialog2::task251341_sideBarRemoveEntries()
|
||||
{
|
||||
#if defined QT_BUILD_INTERNAL
|
||||
QNonNativeFileDialog fd;
|
||||
|
||||
QDir current = QDir::currentPath();
|
||||
@ -984,8 +986,8 @@ void tst_QFileDialog2::task251341_sideBarRemoveEntries()
|
||||
QCOMPARE(mySideBar.urls(), expected);
|
||||
|
||||
current.rmdir("testDir");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QFileDialog2::task254490_selectFileMultipleTimes()
|
||||
{
|
||||
@ -1019,9 +1021,9 @@ void tst_QFileDialog2::task254490_selectFileMultipleTimes()
|
||||
t->deleteLater();
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QFileDialog2::task257579_sideBarWithNonCleanUrls()
|
||||
{
|
||||
#if defined QT_BUILD_INTERNAL
|
||||
QDir dir(tempDir.path());
|
||||
QLatin1String dirname("autotest_task257579");
|
||||
dir.rmdir(dirname); //makes sure it doesn't exist any more
|
||||
@ -1042,8 +1044,8 @@ void tst_QFileDialog2::task257579_sideBarWithNonCleanUrls()
|
||||
|
||||
//all tests are finished, we can remove the temporary dir
|
||||
QVERIFY(dir.rmdir(dirname));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QFileDialog2::task259105_filtersCornerCases()
|
||||
{
|
||||
|
@ -83,8 +83,10 @@ private slots:
|
||||
void indexPath();
|
||||
|
||||
void rootPath();
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void naturalCompare_data();
|
||||
void naturalCompare();
|
||||
#endif
|
||||
void readOnly();
|
||||
void iconProvider();
|
||||
|
||||
@ -231,6 +233,7 @@ void tst_QFileSystemModel::rootPath()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QFileSystemModel::naturalCompare_data()
|
||||
{
|
||||
QTest::addColumn<QString>("s1");
|
||||
@ -277,10 +280,11 @@ void tst_QFileSystemModel::naturalCompare_data()
|
||||
}
|
||||
#undef ROWNAME
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QFileSystemModel::naturalCompare()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QFETCH(QString, s1);
|
||||
QFETCH(QString, s2);
|
||||
QFETCH(int, caseSensitive);
|
||||
@ -298,8 +302,8 @@ void tst_QFileSystemModel::naturalCompare()
|
||||
// created. The scheduler takes its time to recognize ended threads.
|
||||
QTest::qWait(300);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QFileSystemModel::readOnly()
|
||||
{
|
||||
|
@ -115,7 +115,6 @@ private slots:
|
||||
void iconSize();
|
||||
void toolButtonStyle();
|
||||
void menuBar();
|
||||
void statusBar();
|
||||
void centralWidget();
|
||||
void corner();
|
||||
void addToolBarBreak();
|
||||
@ -132,8 +131,11 @@ private slots:
|
||||
void restoreStateFromPreviousVersion();
|
||||
void createPopupMenu();
|
||||
void hideBeforeLayout();
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void saveRestore();
|
||||
void saveRestore_data();
|
||||
void statusBar();
|
||||
#endif
|
||||
void isSeparator();
|
||||
#ifndef QT_NO_CURSOR
|
||||
void setCursor();
|
||||
@ -653,6 +655,7 @@ void tst_QMainWindow::menuBar()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QMainWindow::statusBar()
|
||||
{
|
||||
{
|
||||
@ -734,6 +737,7 @@ void tst_QMainWindow::statusBar()
|
||||
QVERIFY(indexOfSb == -1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QMainWindow::centralWidget()
|
||||
{
|
||||
@ -1510,9 +1514,9 @@ QMap<QString, QRect> dockWidgetGeometries(QMainWindow *mw)
|
||||
QCOMPARE(__newGeos, __oldGeos); \
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QMainWindow::saveRestore_data()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QTest::addColumn<AddList >("addList");
|
||||
QTest::addColumn<MoveList >("moveList");
|
||||
|
||||
@ -1547,12 +1551,12 @@ void tst_QMainWindow::saveRestore_data()
|
||||
<< MoveSeparator(-30, "right1")
|
||||
<< MoveSeparator(30, "right2a")
|
||||
);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QMainWindow::saveRestore()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QFETCH(AddList, addList);
|
||||
QFETCH(MoveList, moveList);
|
||||
|
||||
@ -1613,8 +1617,8 @@ void tst_QMainWindow::saveRestore()
|
||||
mainWindow.show();
|
||||
COMPARE_DOCK_WIDGET_GEOS(dockWidgetGeos, dockWidgetGeometries(&mainWindow));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QMainWindow::isSeparator()
|
||||
{
|
||||
|
@ -189,11 +189,13 @@ private slots:
|
||||
void selectionChanged();
|
||||
void copyPasteBackgroundImage();
|
||||
void setText();
|
||||
void cursorRect();
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void fullWidthSelection_data();
|
||||
void fullWidthSelection();
|
||||
void fullWidthSelection2();
|
||||
void cursorRect();
|
||||
void setDocumentPreservesPalette();
|
||||
#endif
|
||||
void pasteFromQt3RichText();
|
||||
void noWrapBackgrounds();
|
||||
void preserveCharFormatAfterUnchangingSetPosition();
|
||||
@ -1939,6 +1941,7 @@ QT_BEGIN_NAMESPACE
|
||||
extern void qt_setQtEnableTestFont(bool value);
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QTextEdit::fullWidthSelection_data()
|
||||
{
|
||||
QTest::addColumn<int>("cursorFrom");
|
||||
@ -1958,7 +1961,9 @@ void tst_QTextEdit::fullWidthSelection_data()
|
||||
QTest::newRow("single full width line")
|
||||
<< 20 << 30 << (m_fullWidthSelectionImagesFolder + QStringLiteral("/single-full-width-line.png"));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QTextEdit::fullWidthSelection()
|
||||
{
|
||||
QFETCH(int, cursorFrom);
|
||||
@ -2024,7 +2029,9 @@ void tst_QTextEdit::fullWidthSelection()
|
||||
|
||||
compareWidgetAndImage(widget, imageFileName);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QTextEdit::fullWidthSelection2()
|
||||
{
|
||||
QPalette myPalette;
|
||||
@ -2060,6 +2067,7 @@ void tst_QTextEdit::fullWidthSelection2()
|
||||
|
||||
compareWidgetAndImage(widget, "fullWidthSelection/nowrap_long.png");
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QTextEdit::compareWidgetAndImage(QTextEdit &widget, const QString &imageFileName)
|
||||
{
|
||||
@ -2120,9 +2128,9 @@ void tst_QTextEdit::cursorRect()
|
||||
QCOMPARE(ed->cursorRect().width(), 10);
|
||||
}
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QTextEdit::setDocumentPreservesPalette()
|
||||
{
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QWidgetTextControl *control = qFindChild<QWidgetTextControl *>(ed);
|
||||
QVERIFY(control);
|
||||
|
||||
@ -2143,8 +2151,8 @@ void tst_QTextEdit::setDocumentPreservesPalette()
|
||||
QVERIFY(control->document() == newDoc);
|
||||
QVERIFY(whitePal.color(QPalette::Active, QPalette::Text)
|
||||
== control->palette().color(QPalette::Active, QPalette::Text));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
class PublicTextEdit : public QTextEdit
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user