summaryrefslogtreecommitdiffstats
path: root/src/sdk
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 /src/sdk
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 'src/sdk')
-rw-r--r--src/sdk/console_win.cpp8
-rw-r--r--src/sdk/installerbase.cpp6
-rw-r--r--src/sdk/installerbasecommons.cpp4
-rw-r--r--src/sdk/settingsdialog.cpp2
-rw-r--r--src/sdk/tabcontroller.cpp4
5 files changed, 12 insertions, 12 deletions
diff --git a/src/sdk/console_win.cpp b/src/sdk/console_win.cpp
index baca7edaa..f3226bc60 100644
--- a/src/sdk/console_win.cpp
+++ b/src/sdk/console_win.cpp
@@ -46,7 +46,7 @@
static bool isRedirected(HANDLE stdHandle)
{
- if (stdHandle == NULL) // launched from GUI
+ if (stdHandle == nullptr) // launched from GUI
return false;
DWORD fileType = GetFileType(stdHandle);
if (fileType == FILE_TYPE_UNKNOWN) {
@@ -73,8 +73,8 @@ static bool isRedirected(HANDLE stdHandle)
* (e.g. into a file), Console does not interfere.
*/
Console::Console() :
- m_oldCout(0),
- m_oldCerr(0)
+ m_oldCout(nullptr),
+ m_oldCerr(nullptr)
{
bool isCoutRedirected = isRedirected(GetStdHandle(STD_OUTPUT_HANDLE));
bool isCerrRedirected = isRedirected(GetStdHandle(STD_ERROR_HANDLE));
@@ -97,7 +97,7 @@ Console::Console() :
| ENABLE_EXTENDED_FLAGS);
# ifndef Q_CC_MINGW
HMENU systemMenu = GetSystemMenu(GetConsoleWindow(), FALSE);
- if (systemMenu != NULL)
+ if (systemMenu != nullptr)
RemoveMenu(systemMenu, SC_CLOSE, MF_BYCOMMAND);
DrawMenuBar(GetConsoleWindow());
# endif
diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp
index 872600f19..8ec142950 100644
--- a/src/sdk/installerbase.cpp
+++ b/src/sdk/installerbase.cpp
@@ -64,7 +64,7 @@
InstallerBase::InstallerBase(int &argc, char *argv[])
: SDKApp<QApplication>(argc, argv)
- , m_core(0)
+ , m_core(nullptr)
{
QInstaller::init(); // register custom operations
}
@@ -87,7 +87,7 @@ int InstallerBase::run()
// just silently ignore the fact that we could not create the lock file
// and check the running processes.
if (runCheck.isRunning(RunOnceChecker::ConditionFlag::ProcessList)) {
- QInstaller::MessageBoxHandler::information(0, QLatin1String("AlreadyRunning"),
+ QInstaller::MessageBoxHandler::information(nullptr, QLatin1String("AlreadyRunning"),
tr("Waiting for %1").arg(qAppName()),
tr("Another %1 instance is already running. Wait "
"until it finishes, close it, or restart your system.").arg(qAppName()));
@@ -304,7 +304,7 @@ int InstallerBase::run()
}
else {
//create the wizard GUI
- TabController controller(0);
+ TabController controller(nullptr);
controller.setManager(m_core);
controller.setControlScript(controlScript);
if (m_core->isInstaller())
diff --git a/src/sdk/installerbasecommons.cpp b/src/sdk/installerbasecommons.cpp
index 1a335f660..bd1c4cdf5 100644
--- a/src/sdk/installerbasecommons.cpp
+++ b/src/sdk/installerbasecommons.cpp
@@ -39,7 +39,7 @@ using namespace QInstaller;
// -- InstallerGui
InstallerGui::InstallerGui(PackageManagerCore *core)
- : PackageManagerGui(core, 0)
+ : PackageManagerGui(core, nullptr)
{
ProductKeyCheck *checker = ProductKeyCheck::instance();
foreach (const int id, checker->registeredPages()) {
@@ -71,7 +71,7 @@ InstallerGui::InstallerGui(PackageManagerCore *core)
// -- MaintenanceGui
MaintenanceGui::MaintenanceGui(PackageManagerCore *core)
- : PackageManagerGui(core, 0)
+ : PackageManagerGui(core, nullptr)
{
ProductKeyCheck *checker = ProductKeyCheck::instance();
foreach (const int id, checker->registeredPages()) {
diff --git a/src/sdk/settingsdialog.cpp b/src/sdk/settingsdialog.cpp
index 7e2ba31b9..7b05f71c9 100644
--- a/src/sdk/settingsdialog.cpp
+++ b/src/sdk/settingsdialog.cpp
@@ -67,7 +67,7 @@ QWidget *PasswordDelegate::createEditor(QWidget *parent, const QStyleOptionViewI
const
{
if (m_disabledEditor)
- return 0;
+ return nullptr;
QLineEdit *lineEdit = new QLineEdit(parent);
lineEdit->setEchoMode(m_showPasswords ? QLineEdit::Normal : QLineEdit::Password);
diff --git a/src/sdk/tabcontroller.cpp b/src/sdk/tabcontroller.cpp
index dc4549d50..75eb081ce 100644
--- a/src/sdk/tabcontroller.cpp
+++ b/src/sdk/tabcontroller.cpp
@@ -61,8 +61,8 @@ public:
TabController::Private::Private()
: m_init(false)
, m_networkSettingsChanged(false)
- , m_gui(0)
- , m_core(0)
+ , m_gui(nullptr)
+ , m_core(nullptr)
{
}