Author: cazfi
Date: Mon Nov 24 04:11:34 2014
New Revision: 27117
URL: http://svn.gna.org/viewcvs/freeciv?rev=27117&view=rev
Log:
Use 'nullptr' in freeciv-mp-qt code.
See patch #5429
Modified:
trunk/tools/mpgui_qt.cpp
trunk/tools/mpgui_qt_worker.cpp
Modified: trunk/tools/mpgui_qt.cpp
URL:
http://svn.gna.org/viewcvs/freeciv/trunk/tools/mpgui_qt.cpp?rev=27117&r1=27116&r2=27117&view=diff
==============================================================================
--- trunk/tools/mpgui_qt.cpp (original)
+++ trunk/tools/mpgui_qt.cpp Mon Nov 24 04:11:34 2014
@@ -49,7 +49,7 @@
static mpgui *gui;
-static mpqt_worker *worker = NULL;
+static mpqt_worker *worker = nullptr;
static int mpcount = 0;
@@ -113,13 +113,13 @@
main_window->setVisible(true);
errmsg = download_modpack_list(&fcmp, setup_modpack_list, msg_callback);
- if (errmsg != NULL) {
+ if (errmsg != nullptr) {
gui->display_msg(errmsg);
}
qapp->exec();
- if (worker != NULL) {
+ if (worker != nullptr) {
if (worker->isRunning()) {
worker->wait();
}
@@ -170,10 +170,10 @@
char verbuf[2048];
const char *rev_ver = fc_svn_revision();
- if (rev_ver == NULL) {
+ if (rev_ver == nullptr) {
rev_ver = fc_git_revision();
- if (rev_ver == NULL) {
+ if (rev_ver == nullptr) {
fc_snprintf(verbuf, sizeof(verbuf), "%s%s", word_version(),
VERSION_STRING);
} else {
fc_snprintf(verbuf, sizeof(verbuf), _("%s%s\ncommit: %s"),
@@ -213,7 +213,7 @@
hl->addWidget(URL_label);
URLedit = new QLineEdit(central);
- if (fcmp->autoinstall == NULL) {
+ if (fcmp->autoinstall == nullptr) {
URLedit->setText(DEFAULT_URL_START);
} else {
URLedit->setText(QString::fromUtf8(fcmp->autoinstall));
@@ -262,7 +262,7 @@
**************************************************************************/
static void gui_download_modpack(QString URL)
{
- if (worker != NULL) {
+ if (worker != nullptr) {
if (worker->isRunning()) {
gui->display_msg(_("Another download already active"));
return;
@@ -298,7 +298,7 @@
type = (enum modpack_type) type_int;
new_inst = get_installed_version(name_str.toUtf8().data(), type);
- if (new_inst == NULL) {
+ if (new_inst == nullptr) {
new_inst = _("Not installed");
}
@@ -329,7 +329,7 @@
type_str = _("?");
}
- if (license != NULL) {
+ if (license != nullptr) {
lic_str = license;
} else {
/* TRANS: License of modpack is not known */
@@ -337,7 +337,7 @@
}
inst_str = get_installed_version(name, type);
- if (inst_str == NULL) {
+ if (inst_str == nullptr) {
inst_str = _("Not installed");
}
Modified: trunk/tools/mpgui_qt_worker.cpp
URL:
http://svn.gna.org/viewcvs/freeciv/trunk/tools/mpgui_qt_worker.cpp?rev=27117&r1=27116&r2=27117&view=diff
==============================================================================
--- trunk/tools/mpgui_qt_worker.cpp (original)
+++ trunk/tools/mpgui_qt_worker.cpp Mon Nov 24 04:11:34 2014
@@ -46,7 +46,7 @@
errmsg = download_modpack(URL.toUtf8().data(),
fcmp, msg_callback, pb_callback);
- if (errmsg != NULL) {
+ if (errmsg != nullptr) {
msg_callback(errmsg);
} else {
msg_callback(_("Ready"));
_______________________________________________
Freeciv-commits mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-commits