summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp')
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp40
1 files changed, 16 insertions, 24 deletions
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index e06af5a799..4f648a62d6 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -5,36 +5,28 @@
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -140,7 +132,7 @@ void tst_QFileSystemWatcher::basicTest()
watcher.setObjectName(QLatin1String("_qt_autotest_force_engine_") + backend);
QVERIFY(watcher.addPath(testFile.fileName()));
- QSignalSpy changedSpy(&watcher, SIGNAL(fileChanged(QString)));
+ QSignalSpy changedSpy(&watcher, &QFileSystemWatcher::fileChanged);
QVERIFY(changedSpy.isValid());
QEventLoop eventLoop;
QTimer timer;
@@ -278,7 +270,7 @@ void tst_QFileSystemWatcher::watchDirectory()
watcher.setObjectName(QLatin1String("_qt_autotest_force_engine_") + backend);
QVERIFY(watcher.addPath(testDir.absolutePath()));
- QSignalSpy changedSpy(&watcher, SIGNAL(directoryChanged(QString)));
+ QSignalSpy changedSpy(&watcher, &QFileSystemWatcher::directoryChanged);
QVERIFY(changedSpy.isValid());
QEventLoop eventLoop;
QTimer timer;
@@ -441,8 +433,8 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
QVERIFY(watcher.addPath(testDir.absolutePath()));
QVERIFY(watcher.addPath(testFileName));
- QSignalSpy fileChangedSpy(&watcher, SIGNAL(fileChanged(QString)));
- QSignalSpy dirChangedSpy(&watcher, SIGNAL(directoryChanged(QString)));
+ QSignalSpy fileChangedSpy(&watcher, &QFileSystemWatcher::fileChanged);
+ QSignalSpy dirChangedSpy(&watcher, &QFileSystemWatcher::directoryChanged);
QVERIFY(fileChangedSpy.isValid());
QVERIFY(dirChangedSpy.isValid());
QEventLoop eventLoop;
@@ -601,7 +593,7 @@ void tst_QFileSystemWatcher::QTBUG2331()
QVERIFY(watcher.addPath(temporaryDirectory.path()));
// watch signal
- QSignalSpy changedSpy(&watcher, SIGNAL(directoryChanged(QString)));
+ QSignalSpy changedSpy(&watcher, &QFileSystemWatcher::directoryChanged);
QVERIFY(changedSpy.isValid());
// remove directory, we should get one change signal, and we should no longer
@@ -680,7 +672,7 @@ void tst_QFileSystemWatcher::signalsEmittedAfterFileMoved()
connect(&watcher, SIGNAL(fileChanged(QString)), &signalReceiver, SLOT(fileChanged(QString)));
// watch signals
- QSignalSpy changedSpy(&watcher, SIGNAL(fileChanged(QString)));
+ QSignalSpy changedSpy(&watcher, &QFileSystemWatcher::fileChanged);
QVERIFY(changedSpy.isValid());
// move files to second directory