diff options
Diffstat (limited to 'tests/auto/corelib')
5 files changed, 35 insertions, 1 deletions
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp index bb8bb6cc21..3465385ba7 100644 --- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp @@ -100,11 +100,11 @@ tst_qmessagehandler::tst_qmessagehandler() void tst_qmessagehandler::initTestCase() { +#if QT_CONFIG(process) m_appDir = QFINDTESTDATA("app"); QVERIFY2(!m_appDir.isEmpty(), qPrintable( QString::fromLatin1("Couldn't find helper app dir starting from %1.").arg(QDir::currentPath()))); -#if QT_CONFIG(process) m_baseEnvironment = QProcess::systemEnvironment(); for (int i = 0; i < m_baseEnvironment.count(); ++i) { if (m_baseEnvironment.at(i).startsWith("QT_MESSAGE_PATTERN=")) { diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index 81c11ef085..9751bb4c9e 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -412,8 +412,10 @@ static QByteArray msgFileDoesNotExist(const QString &name) void tst_QFile::initTestCase() { QVERIFY2(m_temporaryDir.isValid(), qPrintable(m_temporaryDir.errorString())); +#if QT_CONFIG(process) m_stdinProcessDir = QFINDTESTDATA("stdinprocess"); QVERIFY(!m_stdinProcessDir.isEmpty()); +#endif m_testSourceFile = QFINDTESTDATA("tst_qfile.cpp"); QVERIFY(!m_testSourceFile.isEmpty()); m_testLogFile = QFINDTESTDATA("testlog.txt"); diff --git a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp index dcd9eda4bb..9f67ccd9c9 100644 --- a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp +++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp @@ -101,6 +101,7 @@ private slots: void testRoleNames(); void testDragActions(); + void dragActionsFallsBackToDropActions(); void testFunctionPointerSignalConnection(); @@ -2157,6 +2158,27 @@ void tst_QAbstractItemModel::testDragActions() QVERIFY(actions & Qt::MoveAction); } +class OverrideDropActions : public QStringListModel +{ + Q_OBJECT +public: + OverrideDropActions(QObject *parent = 0) + : QStringListModel(parent) + { + } + Qt::DropActions supportedDropActions() const override + { + return Qt::MoveAction; + } +}; + +void tst_QAbstractItemModel::dragActionsFallsBackToDropActions() +{ + QAbstractItemModel *model = new OverrideDropActions(this); + QCOMPARE(model->supportedDragActions(), Qt::MoveAction); + QCOMPARE(model->supportedDropActions(), Qt::MoveAction); +} + class SignalConnectionTester : public QObject { Q_OBJECT diff --git a/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp b/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp index f99241da3b..adc8c59bf7 100644 --- a/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp +++ b/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp @@ -80,6 +80,8 @@ private slots: void setData_emits_both_roles_data(); void setData_emits_both_roles(); + + void supportedDragDropActions(); }; void tst_QStringListModel::rowsAboutToBeRemoved_rowsRemoved_data() @@ -250,5 +252,12 @@ void tst_QStringListModel::setData_emits_both_roles() expected); } +void tst_QStringListModel::supportedDragDropActions() +{ + QStringListModel model; + QCOMPARE(model.supportedDragActions(), Qt::CopyAction | Qt::MoveAction); + QCOMPARE(model.supportedDropActions(), Qt::CopyAction | Qt::MoveAction); +} + QTEST_MAIN(tst_QStringListModel) #include "tst_qstringlistmodel.moc" diff --git a/tests/auto/corelib/thread/qsemaphore/BLACKLIST b/tests/auto/corelib/thread/qsemaphore/BLACKLIST index c198b90253..eb83b03556 100644 --- a/tests/auto/corelib/thread/qsemaphore/BLACKLIST +++ b/tests/auto/corelib/thread/qsemaphore/BLACKLIST @@ -3,3 +3,4 @@ windows osx-10.12 [tryAcquireWithTimeout:2s] windows +osx-10.12 |