summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Rettberg2017-03-09 13:44:22 +0100
committerSimon Rettberg2017-03-09 13:44:22 +0100
commit18c17484bcb140a3f549add10700f83f843fa7e7 (patch)
tree98736bafb678e93b9bc1181dcc9e55a5c29814a9 /src
parent[printergui] Fill location column by working around cups bug (diff)
downloadprintergui-18c17484bcb140a3f549add10700f83f843fa7e7.tar.gz
printergui-18c17484bcb140a3f549add10700f83f843fa7e7.tar.xz
printergui-18c17484bcb140a3f549add10700f83f843fa7e7.zip
[printergui] Removed NULL checks that can never yield true
Diffstat (limited to 'src')
-rw-r--r--src/maingui/printergui.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/maingui/printergui.cpp b/src/maingui/printergui.cpp
index 528400e..8d094e3 100644
--- a/src/maingui/printergui.cpp
+++ b/src/maingui/printergui.cpp
@@ -233,14 +233,8 @@ static void enableOptionSelection(ppd_file_t *ppd, QStringList &nameList, QCombo
combo->setUpdatesEnabled(false);
combo->clear();
for (int i = 0; i < o->num_choices; ++i) {
- if (o->choices[i].choice == NULL)
- continue;
- if (o->choices[i].text == NULL) {
- combo->addItem(QString::fromUtf8(o->choices[i].choice), QString::fromLatin1(o->choices[i].choice));
- } else {
- combo->addItem(QString::fromUtf8(o->choices[i].text), QString::fromLatin1(o->choices[i].choice));
- }
- if (o->defchoice != NULL && strcmp(o->choices[i].choice, o->defchoice) == 0) {
+ combo->addItem(QString::fromUtf8(o->choices[i].text), QString::fromLatin1(o->choices[i].choice));
+ if (strcmp(o->choices[i].choice, o->defchoice) == 0) {
combo->setCurrentIndex(i);
}
}