[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [print-manager] /: use nullptr
From:       Laurent Montel <null () kde ! org>
Date:       2018-07-14 12:13:25
Message-ID: E1feJQT-0007OT-1E () code ! kde ! org
[Download RAW message or body]

Git commit f27768fba508f56b79471d87e3eeb1ef9ae4f22e by Laurent Montel.
Committed on 14/07/2018 at 12:13.
Pushed by mlaurent into branch 'master'.

use nullptr

M  +1    -1    add-printer/AddPrinterAssistant.cpp
M  +1    -1    add-printer/DevicesModel.cpp
M  +1    -1    configure-printer/ConfigurePrinterInterface.cpp
M  +42   -42   configure-printer/PrinterOptions.cpp
M  +1    -1    libkcups/ClassListWidget.cpp
M  +1    -1    libkcups/JobModel.cpp
M  +17   -17   libkcups/KCupsConnection.cpp
M  +1    -1    libkcups/KCupsPasswordDialog.cpp
M  +2    -2    libkcups/KCupsRequest.cpp
M  +2    -2    libkcups/PPDModel.cpp
M  +1    -1    printer-manager-kcm/PrintKCM.cpp
M  +1    -1    printer-manager-kcm/PrinterDescription.cpp
M  +1    -1    printqueue/PrintQueue.cpp
M  +1    -1    printqueue/PrintQueueUi.cpp

https://commits.kde.org/print-manager/f27768fba508f56b79471d87e3eeb1ef9ae4f22e

diff --git a/add-printer/AddPrinterAssistant.cpp \
b/add-printer/AddPrinterAssistant.cpp index 5a2b81c..1d64315 100644
--- a/add-printer/AddPrinterAssistant.cpp
+++ b/add-printer/AddPrinterAssistant.cpp
@@ -200,7 +200,7 @@ void AddPrinterAssistant::setCurrentPage(KPageWidgetItem *page)
         }
 
         // When ChangePPD() is called addPrinterPage is zero
-        if (page == m_addPrinterPage || m_addPrinterPage == 0) {
+        if (page == m_addPrinterPage || m_addPrinterPage == nullptr) {
             connect(nextPage, &GenericPage::allowProceed, this, \
&AddPrinterAssistant::enableFinishButton);  enableNextButton(false);
             enableFinishButton(nextPage->canProceed());
diff --git a/add-printer/DevicesModel.cpp b/add-printer/DevicesModel.cpp
index 2013772..af74564 100644
--- a/add-printer/DevicesModel.cpp
+++ b/add-printer/DevicesModel.cpp
@@ -129,7 +129,7 @@ void DevicesModel::finished()
         emit errorMessage(i18n("Failed to get a list of devices: '%1'", \
m_request->errorMsg()));  }
     m_request->deleteLater();
-    m_request = 0;
+    m_request = nullptr;
 
     if (hasError || m_mappedDevices.isEmpty()) {
         emit loaded();
diff --git a/configure-printer/ConfigurePrinterInterface.cpp \
b/configure-printer/ConfigurePrinterInterface.cpp index 696a86d..e2f5179 100644
--- a/configure-printer/ConfigurePrinterInterface.cpp
+++ b/configure-printer/ConfigurePrinterInterface.cpp
@@ -60,7 +60,7 @@ void ConfigurePrinterInterface::ConfigurePrinter(const QString \
&destName)  {
     if (!m_uis.contains(destName)) {
         // Reserve this since the CUPS call might take a long time
-        m_uis[destName] = 0;
+        m_uis[destName] = nullptr;
 
         // Get destinations with these attributes
         QPointer<KCupsRequest> request = new KCupsRequest;
diff --git a/configure-printer/PrinterOptions.cpp \
b/configure-printer/PrinterOptions.cpp index 43e5301..a8176b5 100644
--- a/configure-printer/PrinterOptions.cpp
+++ b/configure-printer/PrinterOptions.cpp
@@ -109,7 +109,7 @@ void PrinterOptions::reloadPPD()
     m_filename = request->printerPPD();
     m_ppd = ppdOpenFile(qUtf8Printable(m_filename));
     request->deleteLater();
-    if (m_ppd == NULL) {
+    if (m_ppd == nullptr) {
         qCWarning(PM_CONFIGURE_PRINTER) << "Could not open ppd file:" << m_filename \
<< request->errorMsg();  m_filename.clear();
         return;
@@ -138,7 +138,7 @@ void PrinterOptions::reloadPPD()
         // Guess
         m_codec = QTextCodec::codecForName(lang_encoding);
     }
-    if (m_codec == 0) {
+    if (m_codec == nullptr) {
         m_codec = QTextCodec::codecForName("UTF-8");
     }
 
@@ -153,7 +153,7 @@ void PrinterOptions::reloadPPD()
     ui->autoConfigurePB->hide();
     ppd_attr_t  *ppdattr;
     if (m_ppd->num_filters == 0 ||
-        ((ppdattr = ppdFindAttr(m_ppd, "cupsCommands", NULL)) != NULL &&
+        ((ppdattr = ppdFindAttr(m_ppd, "cupsCommands", nullptr)) != nullptr &&
            ppdattr->value && strstr(ppdattr->value, "AutoConfigure"))) {
         ui->autoConfigurePB->show();
     } else {
@@ -207,7 +207,7 @@ void PrinterOptions::createGroups()
                 continue;
             }
 
-            QWidget *optionW = 0;
+            QWidget *optionW = nullptr;
             switch (option->ui) {
             case PPD_UI_BOOLEAN:
                 optionW = pickBoolean(option, oKeyword, \
ui->scrollAreaWidgetContents); @@ -386,7 +386,7 @@ void \
PrinterOptions::currentIndexChangedCB(int index)  
 PrinterOptions::~PrinterOptions()
 {
-    if (m_ppd != NULL) {
+    if (m_ppd != nullptr) {
         ppdClose(m_ppd);
     }
 
@@ -406,7 +406,7 @@ PrinterOptions::getVariable(const char *name)    const    /* I - \
                Name of variabl
         const QString value = it.value()->property("currentChoice").toString();
         return m_codec->fromUnicode(value).constData();
     } else {
-        return NULL;
+        return nullptr;
     }
 }
 
@@ -437,7 +437,7 @@ PrinterOptions::get_points(double     number,           /* I - \
                Original number *
  * This function also handles generation of custom option values.
  */
 
-char *                           /* O - Value string or NULL on error */
+char *                           /* O - Value string or nullptr on error */
 PrinterOptions::get_option_value(
     ppd_file_t    *ppd,                 /* I - PPD file */
     const char    *name,                /* I - Option name */
@@ -460,14 +460,14 @@ PrinterOptions::get_option_value(
      * See if we have a custom option choice...
      */
 
-    if ((val = getVariable(name)) == NULL) {
+    if ((val = getVariable(name)) == nullptr) {
         /*
          * Option not found!
          */
 
-        return (NULL);
+        return (nullptr);
     } else if (strcasecmp(val, "Custom") ||
-               (coption = ppdFindCustomOption(ppd, name)) == NULL) {
+               (coption = ppdFindCustomOption(ppd, name)) == nullptr) {
         /*
          * Not a custom choice...
          */
@@ -495,11 +495,11 @@ PrinterOptions::get_option_value(
         uval = getVariable("PageSize.Units");
 
         if (!val || !lval || !uval ||
-                (width = strtod(val, NULL)) == 0.0 ||
-                (length = strtod(lval, NULL)) == 0.0 ||
+                (width = strtod(val, nullptr)) == 0.0 ||
+                (length = strtod(lval, nullptr)) == 0.0 ||
                 (strcmp(uval, "pt") && strcmp(uval, "in") && strcmp(uval, "ft") &&
                  strcmp(uval, "cm") && strcmp(uval, "mm") && strcmp(uval, "m"))) {
-            return (NULL);
+            return (nullptr);
         }
 
         width_points  = get_points(width, uval);
@@ -509,7 +509,7 @@ PrinterOptions::get_option_value(
                 width_points > ppd->custom_max[0] ||
                 length_points < ppd->custom_min[1] ||
                 length_points > ppd->custom_max[1]) {
-            return (NULL);
+            return (nullptr);
         }
 
         snprintf(buffer, bufsize, "Custom.%gx%g%s", width, length, uval);
@@ -517,49 +517,49 @@ PrinterOptions::get_option_value(
         cparam = ppdFirstCustomParam(coption);
         snprintf(keyword, sizeof(keyword), "%s.%s", coption->keyword, cparam->name);
 
-        if ((val = getVariable(keyword)) == NULL)
-            return (NULL);
+        if ((val = getVariable(keyword)) == nullptr)
+            return (nullptr);
 
         switch (cparam->type) {
         case PPD_CUSTOM_CURVE :
         case PPD_CUSTOM_INVCURVE :
         case PPD_CUSTOM_REAL :
-            if ((number = strtod(val, NULL)) == 0.0 ||
+            if ((number = strtod(val, nullptr)) == 0.0 ||
                     number < cparam->minimum.custom_real ||
                     number > cparam->maximum.custom_real)
-                return (NULL);
+                return (nullptr);
 
             snprintf(buffer, bufsize, "Custom.%g", number);
             break;
         case PPD_CUSTOM_INT :
-            if (!*val || (integer = strtol(val, NULL, 10)) == LONG_MIN ||
+            if (!*val || (integer = strtol(val, nullptr, 10)) == LONG_MIN ||
                     integer == LONG_MAX ||
                     integer < cparam->minimum.custom_int ||
                     integer > cparam->maximum.custom_int)
-                return (NULL);
+                return (nullptr);
 
             snprintf(buffer, bufsize, "Custom.%ld", integer);
             break;
         case PPD_CUSTOM_POINTS :
             snprintf(keyword, sizeof(keyword), "%s.Units", coption->keyword);
 
-            if ((number = strtod(val, NULL)) == 0.0 ||
-                    (uval = getVariable(keyword)) == NULL ||
+            if ((number = strtod(val, nullptr)) == 0.0 ||
+                    (uval = getVariable(keyword)) == nullptr ||
                     (strcmp(uval, "pt") && strcmp(uval, "in") && strcmp(uval, "ft") \
                &&
                      strcmp(uval, "cm") && strcmp(uval, "mm") && strcmp(uval, "m")))
-                return (NULL);
+                return (nullptr);
 
             number_points = get_points(number, uval);
             if (number_points < cparam->minimum.custom_points ||
                     number_points > cparam->maximum.custom_points)
-                return (NULL);
+                return (nullptr);
 
             snprintf(buffer, bufsize, "Custom.%g%s", number, uval);
             break;
         case PPD_CUSTOM_PASSCODE :
             for (uval = val; *uval; ++uval) {
                 if (!isdigit(*uval & 255)) {
-                    return (NULL);
+                    return (nullptr);
                 }
             }
         case PPD_CUSTOM_PASSWORD :
@@ -567,7 +567,7 @@ PrinterOptions::get_option_value(
             integer = (long)strlen(val);
             if (integer < cparam->minimum.custom_string ||
                     integer > cparam->maximum.custom_string) {
-                return (NULL);
+                return (nullptr);
             }
 
             snprintf(buffer, bufsize, "Custom.%s", val);
@@ -586,8 +586,8 @@ PrinterOptions::get_option_value(
             snprintf(keyword, sizeof(keyword), "%s.%s", coption->keyword,
                      cparam->name);
 
-            if ((val = getVariable(keyword)) == NULL) {
-                return (NULL);
+            if ((val = getVariable(keyword)) == nullptr) {
+                return (nullptr);
             }
 
             snprintf(bufptr, bufend - bufptr, "%s%s=", prefix, cparam->name);
@@ -598,19 +598,19 @@ PrinterOptions::get_option_value(
             case PPD_CUSTOM_CURVE :
             case PPD_CUSTOM_INVCURVE :
             case PPD_CUSTOM_REAL :
-                if ((number = strtod(val, NULL)) == 0.0 ||
+                if ((number = strtod(val, nullptr)) == 0.0 ||
                         number < cparam->minimum.custom_real ||
                         number > cparam->maximum.custom_real)
-                    return (NULL);
+                    return (nullptr);
 
                 snprintf(bufptr, bufend - bufptr, "%g", number);
                 break;
             case PPD_CUSTOM_INT :
-                if (!*val || (integer = strtol(val, NULL, 10)) == LONG_MIN ||
+                if (!*val || (integer = strtol(val, nullptr, 10)) == LONG_MIN ||
                         integer == LONG_MAX ||
                         integer < cparam->minimum.custom_int ||
                         integer > cparam->maximum.custom_int) {
-                    return (NULL);
+                    return (nullptr);
                 }
 
                 snprintf(bufptr, bufend - bufptr, "%ld", integer);
@@ -618,18 +618,18 @@ PrinterOptions::get_option_value(
             case PPD_CUSTOM_POINTS :
                 snprintf(keyword, sizeof(keyword), "%s.Units", coption->keyword);
 
-                if ((number = strtod(val, NULL)) == 0.0 ||
-                        (uval = getVariable(keyword)) == NULL ||
+                if ((number = strtod(val, nullptr)) == 0.0 ||
+                        (uval = getVariable(keyword)) == nullptr ||
                         (strcmp(uval, "pt") && strcmp(uval, "in") &&
                          strcmp(uval, "ft") && strcmp(uval, "cm") &&
                          strcmp(uval, "mm") && strcmp(uval, "m"))) {
-                    return (NULL);
+                    return (nullptr);
                 }
 
                 number_points = get_points(number, uval);
                 if (number_points < cparam->minimum.custom_points ||
                         number_points > cparam->maximum.custom_points) {
-                    return (NULL);
+                    return (nullptr);
                 }
 
                 snprintf(bufptr, bufend - bufptr, "%g%s", number, uval);
@@ -638,7 +638,7 @@ PrinterOptions::get_option_value(
             case PPD_CUSTOM_PASSCODE :
                 for (uval = val; *uval; uval ++) {
                     if (!isdigit(*uval & 255)) {
-                        return (NULL);
+                        return (nullptr);
                     }
                 }
             case PPD_CUSTOM_PASSWORD :
@@ -646,11 +646,11 @@ PrinterOptions::get_option_value(
                 integer = (long)strlen(val);
                 if (integer < cparam->minimum.custom_string ||
                         integer > cparam->maximum.custom_string) {
-                    return (NULL);
+                    return (nullptr);
                 }
 
                 if ((bufptr + 2) > bufend) {
-                    return (NULL);
+                    return (nullptr);
                 }
 
                 bufend --;
@@ -659,7 +659,7 @@ PrinterOptions::get_option_value(
                 while (*val && bufptr < bufend) {
                     if (*val == '\\' || *val == '\"') {
                         if ((bufptr + 1) >= bufend) {
-                            return (NULL);
+                            return (nullptr);
                         }
 
                         *bufptr++ = '\\';
@@ -669,7 +669,7 @@ PrinterOptions::get_option_value(
                 }
 
                 if (bufptr >= bufend) {
-                    return (NULL);
+                    return (nullptr);
                 }
 
                 *bufptr++ = '\"';
@@ -682,7 +682,7 @@ PrinterOptions::get_option_value(
         }
 
         if (bufptr == buffer || (bufend - bufptr) < 2) {
-            return (NULL);
+            return (nullptr);
         }
 
         strcpy(bufptr, "}");
diff --git a/libkcups/ClassListWidget.cpp b/libkcups/ClassListWidget.cpp
index 2563eb5..a65405b 100644
--- a/libkcups/ClassListWidget.cpp
+++ b/libkcups/ClassListWidget.cpp
@@ -88,7 +88,7 @@ void ClassListWidget::loadFinished(KCupsRequest *request)
 
     const KCupsPrinters printers = request->printers();
     request->deleteLater();
-    m_request = 0;
+    m_request = nullptr;
 
     for (const KCupsPrinter &printer : printers) {
         QString destName = printer.name();
diff --git a/libkcups/JobModel.cpp b/libkcups/JobModel.cpp
index 4c02210..580ab04 100644
--- a/libkcups/JobModel.cpp
+++ b/libkcups/JobModel.cpp
@@ -218,7 +218,7 @@ void JobModel::getJobFinished(KCupsRequest *request)
     } else {
         qCWarning(LIBKCUPS) << "Should not be called from a non KCupsRequest class" \
<< sender();  }
-    m_jobRequest = 0;
+    m_jobRequest = nullptr;
 }
 
 void JobModel::jobCompleted(const QString &text,
diff --git a/libkcups/KCupsConnection.cpp b/libkcups/KCupsConnection.cpp
index 9baddd5..0408a58 100644
--- a/libkcups/KCupsConnection.cpp
+++ b/libkcups/KCupsConnection.cpp
@@ -64,7 +64,7 @@
 Q_DECLARE_METATYPE(QList<int>)
 Q_DECLARE_METATYPE(QList<bool>)
 
-KCupsConnection* KCupsConnection::m_instance = 0;
+KCupsConnection* KCupsConnection::m_instance = nullptr;
 static int password_retries = 0;
 static int total_retries = 0;
 static int internalErrorCount = 0;
@@ -96,7 +96,7 @@ KCupsConnection::KCupsConnection(const QUrl &server, QObject \
*parent) :  KCupsConnection::~KCupsConnection()
 {
     if (m_instance == this) {
-        m_instance = 0;
+        m_instance = nullptr;
     }
     m_passwordDialog->deleteLater();
 
@@ -324,10 +324,10 @@ bool KCupsConnection::readyToStart()
 ReturnArguments KCupsConnection::request(const KIppRequest &request, ipp_tag_t \
groupTag) const  {
     ReturnArguments ret;
-    ipp_t *response = NULL;
+    ipp_t *response = nullptr;
     do {
         ippDelete(response);
-        response = NULL;
+        response = nullptr;
 
         response = request.sendIppRequest();
     } while (retry(qUtf8Printable(request.resource()), request.operation()));
@@ -373,7 +373,7 @@ int KCupsConnection::renewDBusSubscription(int subscriptionId, \
int leaseDuration  KCUPS_NOTIFY_SUBSCRIPTION_ID, subscriptionId);
     }
 
-    ipp_t *response = NULL;
+    ipp_t *response = nullptr;
     do {
         // Do the request
         response = request.sendIppRequest();
@@ -390,7 +390,7 @@ int KCupsConnection::renewDBusSubscription(int subscriptionId, \
int leaseDuration  ret = subscriptionId;
         } else if ((attr = ippFindAttribute(response,
                                             "notify-subscription-id",
-                                            IPP_TAG_INTEGER)) == NULL) {
+                                            IPP_TAG_INTEGER)) == nullptr) {
             qCWarning(LIBKCUPS) << "No notify-subscription-id in response!";
             ret = -1;
         } else {
@@ -589,9 +589,9 @@ ReturnArguments KCupsConnection::parseIPPVars(ipp_t *response, \
ipp_tag_t group_t  
 #if !(CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 6)
     QVariantHash destAttributes;
-    for (attr = ippFirstAttribute(response); attr != NULL; attr = \
ippNextAttribute(response)) { +    for (attr = ippFirstAttribute(response); attr != \
nullptr; attr = ippNextAttribute(response)) {  // We hit an attribute sepparator
-        if (ippGetName(attr) == NULL) {
+        if (ippGetName(attr) == nullptr) {
             ret << destAttributes;
             destAttributes.clear();
             continue;
@@ -621,7 +621,7 @@ ReturnArguments KCupsConnection::parseIPPVars(ipp_t *response, \
ipp_tag_t group_t  ret << destAttributes;
     }
 #else
-    for (attr = response->attrs; attr != NULL; attr = attr->next) {
+    for (attr = response->attrs; attr != nullptr; attr = attr->next) {
        /*
         * Skip leading attributes until we hit a a group which can be a printer, \
                job...
         */
@@ -629,7 +629,7 @@ ReturnArguments KCupsConnection::parseIPPVars(ipp_t *response, \
ipp_tag_t group_t  attr = attr->next;
         }
 
-        if (attr == NULL) {
+        if (attr == nullptr) {
             break;
         }
 
@@ -660,7 +660,7 @@ ReturnArguments KCupsConnection::parseIPPVars(ipp_t *response, \
ipp_tag_t group_t  
         ret << destAttributes;
 
-        if (attr == NULL) {
+        if (attr == nullptr) {
             break;
         }
     }
@@ -710,11 +710,11 @@ QVariant KCupsConnection::ippAttrToVariant(ipp_attribute_t \
*attr)  break;
     default:
         if (ippGetCount(attr)== 1) {
-            ret = QString::fromUtf8(ippGetString(attr, 0, NULL));
+            ret = QString::fromUtf8(ippGetString(attr, 0, nullptr));
         } else {
             QStringList values;
             for (int i = 0; i < ippGetCount(attr); ++i) {
-                values << QString::fromUtf8(ippGetString(attr, i, NULL));
+                values << QString::fromUtf8(ippGetString(attr, i, nullptr));
             }
             ret = values;
         }
@@ -865,8 +865,8 @@ const char * password_cb(const char *prompt, http_t *http, const \
char *method, c  
     if (++password_retries > 3) {
         // cancel the authentication
-        cupsSetUser(NULL);
-        return NULL;
+        cupsSetUser(nullptr);
+        return nullptr;
     }
 
     auto passwordDialog = static_cast<KCupsPasswordDialog *>(user_data);
@@ -889,8 +889,8 @@ const char * password_cb(const char *prompt, http_t *http, const \
char *method, c  } else {
         // the dialog was canceled
         password_retries = -1;
-        cupsSetUser(NULL);
-        return NULL;
+        cupsSetUser(nullptr);
+        return nullptr;
     }
 }
 
diff --git a/libkcups/KCupsPasswordDialog.cpp b/libkcups/KCupsPasswordDialog.cpp
index 60011cc..b98e1ef 100644
--- a/libkcups/KCupsPasswordDialog.cpp
+++ b/libkcups/KCupsPasswordDialog.cpp
@@ -42,7 +42,7 @@ void KCupsPasswordDialog::setMainWindow(WId mainwindow)
 
 void KCupsPasswordDialog::exec(const QString &username, bool wrongPassword)
 {
-    QPointer<KPasswordDialog> dialog = new KPasswordDialog(0L, \
KPasswordDialog::ShowUsernameLine); +    QPointer<KPasswordDialog> dialog = new \
                KPasswordDialog(nullptr, KPasswordDialog::ShowUsernameLine);
     dialog->setPrompt(i18n("Enter an username and a password to complete the \
task"));  dialog->setModal(false);
     dialog->setUsername(username);
diff --git a/libkcups/KCupsRequest.cpp b/libkcups/KCupsRequest.cpp
index e6d3bd9..7617b54 100644
--- a/libkcups/KCupsRequest.cpp
+++ b/libkcups/KCupsRequest.cpp
@@ -36,7 +36,7 @@ KCupsRequest::KCupsRequest(KCupsConnection *connection) :
     m_connection(connection)
 {
     // If no connection was specified use default one
-    if (m_connection == 0) {
+    if (m_connection == nullptr) {
         m_connection = KCupsConnection::global();
     }
     connect(this, &KCupsRequest::finished, &m_loop, &QEventLoop::quit);
@@ -455,7 +455,7 @@ void KCupsRequest::printCommand(const QString &printerName, const \
QString &comma  status = cupsStartDocument(CUPS_HTTP_DEFAULT,
                                        qUtf8Printable(printerName),
                                        job_id,
-                                       NULL,
+                                       nullptr,
                                        CUPS_FORMAT_COMMAND,
                                        1);
             if (status == HTTP_CONTINUE) {
diff --git a/libkcups/PPDModel.cpp b/libkcups/PPDModel.cpp
index 5e9fdcd..24f1f41 100644
--- a/libkcups/PPDModel.cpp
+++ b/libkcups/PPDModel.cpp
@@ -32,7 +32,7 @@ void PPDModel::setPPDs(const QList<QVariantHash> &ppds, const \
DriverMatchList &d  {
     clear();
 
-    QStandardItem *recommended = 0;
+    QStandardItem *recommended = nullptr;
     for (const DriverMatch &driver : driverMatch) {
         // Find the matched PPD on the PPDs list
         for (const QVariantHash &ppd : ppds) {
@@ -40,7 +40,7 @@ void PPDModel::setPPDs(const QList<QVariantHash> &ppds, const \
DriverMatchList &d  // Create the PPD
                 QStandardItem *ppdItem = createPPDItem(ppd, true);
 
-                if (recommended == 0) {
+                if (recommended == nullptr) {
                     recommended = new QStandardItem;
                     recommended->setText(i18n("Recommended Drivers"));
                     appendRow(recommended);
diff --git a/printer-manager-kcm/PrintKCM.cpp b/printer-manager-kcm/PrintKCM.cpp
index d88493d..08936b0 100644
--- a/printer-manager-kcm/PrintKCM.cpp
+++ b/printer-manager-kcm/PrintKCM.cpp
@@ -338,7 +338,7 @@ void PrintKCM::getServerSettingsFinished(KCupsRequest *request)
 
     request->deleteLater();
 
-    m_serverRequest = 0;
+    m_serverRequest = nullptr;
 }
 
 void PrintKCM::updateServerFinished(KCupsRequest *request)
diff --git a/printer-manager-kcm/PrinterDescription.cpp \
b/printer-manager-kcm/PrinterDescription.cpp index 5a559e2..5bef8cc 100644
--- a/printer-manager-kcm/PrinterDescription.cpp
+++ b/printer-manager-kcm/PrinterDescription.cpp
@@ -55,7 +55,7 @@ PrinterDescription::PrinterDescription(QWidget *parent) :
                   KIconLoader::SizeMedium,
                   KIconLoader::DefaultState,
                   QStringList(),
-                  0,
+                  nullptr,
                   true);
 
     auto menu = new QMenu(ui->maintenancePB);
diff --git a/printqueue/PrintQueue.cpp b/printqueue/PrintQueue.cpp
index c5ec8c1..7c71602 100644
--- a/printqueue/PrintQueue.cpp
+++ b/printqueue/PrintQueue.cpp
@@ -58,7 +58,7 @@ void PrintQueue::showQueue(const QString &destName)
     qDebug() << Q_FUNC_INFO << destName;
     if (!m_uis.contains(destName)) {
         // Reserve this since the CUPS call might take a long time
-        m_uis[destName] = 0;
+        m_uis[destName] = nullptr;
 
         // Get destinations with these attributes
         QPointer<KCupsRequest> request = new KCupsRequest;
diff --git a/printqueue/PrintQueueUi.cpp b/printqueue/PrintQueueUi.cpp
index ce0fb7c..0f88d2f 100644
--- a/printqueue/PrintQueueUi.cpp
+++ b/printqueue/PrintQueueUi.cpp
@@ -94,7 +94,7 @@ PrintQueueUi::PrintQueueUi(const KCupsPrinter &printer, QWidget \
                *parent) :
                                                   KIconLoader::SizeMedium,
                                                   KIconLoader::DefaultState,
                                                   QStringList(),
-                                                  0,
+                                                  nullptr,
                                                   true);
 
     ui->printerStatusMsgL->setText(QString());


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic