Changeset View
Changeset View
Standalone View
Standalone View
src/molcalcwidget.cpp
Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Line(s) | 79 | if (!(!file.open(QIODevice::ReadOnly | QIODevice::Text))) { | |||
---|---|---|---|---|---|
93 | } | 93 | } | ||
94 | 94 | | |||
95 | int length = shortList.length(); | 95 | int length = shortList.length(); | ||
96 | ui.user_defined->setRowCount(length); | 96 | ui.user_defined->setRowCount(length); | ||
97 | // Put all the aliases on to the table in the user interface | 97 | // Put all the aliases on to the table in the user interface | ||
98 | for (i = 0; i < length; ++i) { | 98 | for (i = 0; i < length; ++i) { | ||
99 | shortForm = shortList.takeFirst (); | 99 | shortForm = shortList.takeFirst (); | ||
100 | fullForm = fullList.takeFirst (); | 100 | fullForm = fullList.takeFirst (); | ||
101 | ui.user_defined->setItem((int)i, 0, new QTableWidgetItem | 101 | ui.user_defined->setItem(i, 0, new QTableWidgetItem | ||
pino: `i` is already int, so this cast can go altogether | |||||
102 | (i18n("%1",shortForm + " : " + fullForm))); | 102 | (i18n("%1",shortForm + " : " + fullForm))); | ||
103 | } | 103 | } | ||
104 | } else { | 104 | } else { | ||
105 | qDebug() << fileName << " could not be opened!"; | 105 | qDebug() << fileName << " could not be opened!"; | ||
106 | } | 106 | } | ||
107 | 107 | | |||
108 | // Find the system defined aliases | 108 | // Find the system defined aliases | ||
109 | // Open the file | 109 | // Open the file | ||
Show All 19 Lines | 116 | if (!(!file2.open(QIODevice::ReadOnly | QIODevice::Text))) { | |||
129 | } | 129 | } | ||
130 | int length = shortList.length(); | 130 | int length = shortList.length(); | ||
131 | ui.pre_defined->setRowCount(length); | 131 | ui.pre_defined->setRowCount(length); | ||
132 | 132 | | |||
133 | // Put all the aliases on to the table in the user interface | 133 | // Put all the aliases on to the table in the user interface | ||
134 | for (i = 0; i < length; ++i) { | 134 | for (i = 0; i < length; ++i) { | ||
135 | shortForm = shortList.takeFirst(); | 135 | shortForm = shortList.takeFirst(); | ||
136 | fullForm = fullList.takeFirst(); | 136 | fullForm = fullList.takeFirst(); | ||
137 | ui.pre_defined->setItem((int)i, 0, new QTableWidgetItem | 137 | ui.pre_defined->setItem(i, 0, new QTableWidgetItem | ||
pino: ditto | |||||
138 | (i18n("%1",shortForm + " : " + fullForm))); | 138 | (i18n("%1",shortForm + " : " + fullForm))); | ||
139 | } | 139 | } | ||
140 | } else { | 140 | } else { | ||
141 | qDebug() << fileName << " could not be opened!"; | 141 | qDebug() << fileName << " could not be opened!"; | ||
142 | } | 142 | } | ||
143 | } | 143 | } | ||
144 | } | 144 | } | ||
145 | 145 | | |||
▲ Show 20 Lines • Show All 187 Lines • Show Last 20 Lines |
i is already int, so this cast can go altogether