summaryrefslogtreecommitdiffstats
path: root/tests/auto/installer
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2018-11-01 10:38:13 +0200
committerKatja Marttila <katja.marttila@qt.io>2019-01-09 05:41:16 +0000
commit9dacee18f9b7211699164bc70dd17f9934a15f50 (patch)
treed16ee18d0f54a9c28f07aeebab77bb8b9168da55 /tests/auto/installer
parent818c8ab9836c3e949e891e2266807dbd59c31906 (diff)
Replace 0 with nullptr
Prevents a lot of warnings seen in QtCreator Change-Id: I63bf95aca68a04fc9fd0eecbe29c63e9b9c47efd Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'tests/auto/installer')
-rw-r--r--tests/auto/installer/binaryformat/tst_binaryformat.cpp2
-rw-r--r--tests/auto/installer/consumeoutputoperationtest/tst_consumeoutputoperationtest.cpp2
-rw-r--r--tests/auto/installer/extractarchiveoperationtest/tst_extractarchiveoperationtest.cpp6
-rw-r--r--tests/auto/installer/fakestopprocessforupdateoperation/tst_fakestopprocessforupdateoperation.cpp2
-rw-r--r--tests/auto/installer/settingsoperation/tst_settingsoperation.cpp24
5 files changed, 18 insertions, 18 deletions
diff --git a/tests/auto/installer/binaryformat/tst_binaryformat.cpp b/tests/auto/installer/binaryformat/tst_binaryformat.cpp
index 57f2a37e3..6b40452c0 100644
--- a/tests/auto/installer/binaryformat/tst_binaryformat.cpp
+++ b/tests/auto/installer/binaryformat/tst_binaryformat.cpp
@@ -52,7 +52,7 @@ class TestOperation : public KDUpdater::UpdateOperation
{
public:
TestOperation(const QString &name)
- : KDUpdater::UpdateOperation(0)
+ : KDUpdater::UpdateOperation(nullptr)
{ setName(name); }
virtual void backup() {}
diff --git a/tests/auto/installer/consumeoutputoperationtest/tst_consumeoutputoperationtest.cpp b/tests/auto/installer/consumeoutputoperationtest/tst_consumeoutputoperationtest.cpp
index 885aca81a..8250a7dd2 100644
--- a/tests/auto/installer/consumeoutputoperationtest/tst_consumeoutputoperationtest.cpp
+++ b/tests/auto/installer/consumeoutputoperationtest/tst_consumeoutputoperationtest.cpp
@@ -62,7 +62,7 @@ private slots:
void testMissingArguments()
{
- ConsumeOutputOperation operation(0);
+ ConsumeOutputOperation operation(nullptr);
QVERIFY(operation.testOperation());
QVERIFY(!operation.performOperation());
diff --git a/tests/auto/installer/extractarchiveoperationtest/tst_extractarchiveoperationtest.cpp b/tests/auto/installer/extractarchiveoperationtest/tst_extractarchiveoperationtest.cpp
index 40af0d497..a5f38e0ea 100644
--- a/tests/auto/installer/extractarchiveoperationtest/tst_extractarchiveoperationtest.cpp
+++ b/tests/auto/installer/extractarchiveoperationtest/tst_extractarchiveoperationtest.cpp
@@ -48,7 +48,7 @@ private slots:
void testMissingArguments()
{
- ExtractArchiveOperation op(0);
+ ExtractArchiveOperation op(nullptr);
QVERIFY(op.testOperation());
QVERIFY(!op.performOperation());
@@ -62,7 +62,7 @@ private slots:
void testExtractOperationValidFile()
{
- ExtractArchiveOperation op(0);
+ ExtractArchiveOperation op(nullptr);
op.setArguments(QStringList() << ":///data/valid.7z" << QDir::tempPath());
QVERIFY(op.testOperation());
@@ -72,7 +72,7 @@ private slots:
void testExtractOperationInvalidFile()
{
- ExtractArchiveOperation op(0);
+ ExtractArchiveOperation op(nullptr);
op.setArguments(QStringList() << ":///data/invalid.7z" << QDir::tempPath());
QVERIFY(op.testOperation());
diff --git a/tests/auto/installer/fakestopprocessforupdateoperation/tst_fakestopprocessforupdateoperation.cpp b/tests/auto/installer/fakestopprocessforupdateoperation/tst_fakestopprocessforupdateoperation.cpp
index 583bb26f0..e72c71ed7 100644
--- a/tests/auto/installer/fakestopprocessforupdateoperation/tst_fakestopprocessforupdateoperation.cpp
+++ b/tests/auto/installer/fakestopprocessforupdateoperation/tst_fakestopprocessforupdateoperation.cpp
@@ -28,7 +28,7 @@ private slots:
void testMissingPackageManagerCore()
{
- FakeStopProcessForUpdateOperation op(0);
+ FakeStopProcessForUpdateOperation op(nullptr);
op.setArguments(QStringList() << QFileInfo(QCoreApplication::applicationFilePath()).fileName());
QVERIFY(op.testOperation());
diff --git a/tests/auto/installer/settingsoperation/tst_settingsoperation.cpp b/tests/auto/installer/settingsoperation/tst_settingsoperation.cpp
index 7530910b6..ced0e6f36 100644
--- a/tests/auto/installer/settingsoperation/tst_settingsoperation.cpp
+++ b/tests/auto/installer/settingsoperation/tst_settingsoperation.cpp
@@ -60,7 +60,7 @@ private slots:
void testWrongArguments()
{
- SettingsOperation noArgumentsOperation(0);
+ SettingsOperation noArgumentsOperation(nullptr);
QVERIFY(noArgumentsOperation.testOperation());
@@ -76,7 +76,7 @@ private slots:
// same for undo
QCOMPARE(noArgumentsOperation.undoOperation(), false);
- SettingsOperation wrongMethodArgumentOperation(0);
+ SettingsOperation wrongMethodArgumentOperation(nullptr);
wrongMethodArgumentOperation.setArguments(QStringList() << "path=first" << "method=second"
<< "key=third" << "value=fourth");
@@ -109,7 +109,7 @@ private slots:
testSettings.setValue(key, value);
}
- SettingsOperation settingsOperation(0);
+ SettingsOperation settingsOperation(nullptr);
settingsOperation.setArguments(QStringList() << QString("path=%1").arg(testFilePath) <<
"method=set" << QString("key=%1").arg(key) << QString("value=%1").arg(value));
settingsOperation.backup();
@@ -127,7 +127,7 @@ private slots:
const QString key = "key";
const QString value = "value";
- SettingsOperation settingsOperation(0);
+ SettingsOperation settingsOperation(nullptr);
settingsOperation.setArguments(QStringList() << QString("path=%1").arg(testFilePath) <<
"method=set" << QString("key=%1").arg(key) << QString("value=%1").arg(value));
settingsOperation.backup();
@@ -154,7 +154,7 @@ private slots:
}
QCOMPARE(testValueString.isEmpty(), false);
- SettingsOperation settingsOperation(0);
+ SettingsOperation settingsOperation(nullptr);
settingsOperation.setArguments(QStringList() << QString("path=%1").arg(testFilePath) <<
"method=remove" << QString("key=%1").arg(key));
settingsOperation.backup();
@@ -189,10 +189,10 @@ private slots:
testFile.close();
QMap<QString, SettingsOperation*> testSettingsOperationMap;
- testSettingsOperationMap["testcategory/categoryarrayvalue1"] = new SettingsOperation(0);
- testSettingsOperationMap["testcategory/categoryarrayvalue2"] = new SettingsOperation(0);
- testSettingsOperationMap["testcategory/categoryarrayvalue3"] = new SettingsOperation(0);
- testSettingsOperationMap["testcategory/categoryarrayvalue4"] = new SettingsOperation(0);
+ testSettingsOperationMap["testcategory/categoryarrayvalue1"] = new SettingsOperation(nullptr);
+ testSettingsOperationMap["testcategory/categoryarrayvalue2"] = new SettingsOperation(nullptr);
+ testSettingsOperationMap["testcategory/categoryarrayvalue3"] = new SettingsOperation(nullptr);
+ testSettingsOperationMap["testcategory/categoryarrayvalue4"] = new SettingsOperation(nullptr);
QMap<QString, SettingsOperation*>::iterator i = testSettingsOperationMap.begin();
while (i != testSettingsOperationMap.end()) {
@@ -256,9 +256,9 @@ private slots:
testFile.close();
QMap<QString, SettingsOperation*> testSettingsOperationMap;
- testSettingsOperationMap["testcategory/categoryarrayvalue1"] = new SettingsOperation(0);
- testSettingsOperationMap["testcategory/categoryarrayvalue2"] = new SettingsOperation(0);
- testSettingsOperationMap["testcategory/categoryarrayvalue3"] = new SettingsOperation(0);
+ testSettingsOperationMap["testcategory/categoryarrayvalue1"] = new SettingsOperation(nullptr);
+ testSettingsOperationMap["testcategory/categoryarrayvalue2"] = new SettingsOperation(nullptr);
+ testSettingsOperationMap["testcategory/categoryarrayvalue3"] = new SettingsOperation(nullptr);
QMap<QString, SettingsOperation*>::iterator i = testSettingsOperationMap.begin();
while (i != testSettingsOperationMap.end()) {