summaryrefslogtreecommitdiff
path: root/src/profilesdialog.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2014-11-28 11:19:20 +0100
committerTannin <devnull@localhost>2014-11-28 11:19:20 +0100
commit99de80e7224f2491fb7518e32f195ad6a912b624 (patch)
treeef8f1d3ba16b7681beaae5cf67d0f5671e486061 /src/profilesdialog.cpp
parent78f628e0af2f2df562c40ac1424b432b6a969055 (diff)
replaced all uses of NULL with nullptr
fixed a few placed where NULL was used as a number or boolean
Diffstat (limited to 'src/profilesdialog.cpp')
-rw-r--r--src/profilesdialog.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/profilesdialog.cpp b/src/profilesdialog.cpp
index 3fdad880..26891b3c 100644
--- a/src/profilesdialog.cpp
+++ b/src/profilesdialog.cpp
@@ -177,7 +177,7 @@ void ProfilesDialog::on_removeProfileButton_clicked()
Profile::Ptr currentProfile = profilesList->currentItem()->data(Qt::UserRole).value<Profile::Ptr>();
QString profilePath;
- if (currentProfile.get() == NULL) {
+ if (currentProfile.get() == nullptr) {
profilePath = QDir::fromNativeSeparators(ToQString(GameInfo::instance().getProfilesDir())) + "/" + profilesList->currentItem()->text();
if (QMessageBox::question(this, tr("Profile broken"),
tr("This profile you're about to delete seems to be broken or the path is invalid. "
@@ -190,7 +190,7 @@ void ProfilesDialog::on_removeProfileButton_clicked()
profilePath = currentProfile->getPath();
}
QListWidgetItem* item = profilesList->takeItem(profilesList->currentRow());
- if (item != NULL) {
+ if (item != nullptr) {
delete item;
}
if (!shellDelete(QStringList(profilePath))) {
@@ -231,7 +231,7 @@ void ProfilesDialog::on_invalidationBox_stateChanged(int state)
QListWidget *profilesList = findChild<QListWidget*>("profilesList");
QListWidgetItem *currentItem = profilesList->currentItem();
- if (currentItem == NULL) {
+ if (currentItem == nullptr) {
return;
}
if (!ui->invalidationBox->isEnabled()) {
@@ -263,7 +263,7 @@ void ProfilesDialog::on_profilesList_currentItemChanged(QListWidgetItem *current
QPushButton *transferButton = findChild<QPushButton*>("transferButton");
QPushButton *renameButton = findChild<QPushButton*>("renameButton");
- if (current != NULL) {
+ if (current != nullptr) {
if (!current->data(Qt::UserRole).isValid()) return;
const Profile::Ptr currentProfile = current->data(Qt::UserRole).value<Profile::Ptr>();