Changeset View
Changeset View
Standalone View
Standalone View
src/common.cpp
Show All 9 Lines | |||||
10 | * This program is distributed in the hope that it will be useful, * | 10 | * This program is distributed in the hope that it will be useful, * | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
13 | * GNU General Public License for more details. * | 13 | * GNU General Public License for more details. * | ||
14 | * * | 14 | * * | ||
15 | * You should have received a copy of the GNU General Public License * | 15 | * You should have received a copy of the GNU General Public License * | ||
16 | * along with this program; if not, write to the * | 16 | * along with this program; if not, write to the * | ||
17 | * Free Software Foundation, Inc., * | 17 | * Free Software Foundation, Inc., * | ||
18 | * 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. * | 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * | ||
19 | ***************************************************************************/ | 19 | ***************************************************************************/ | ||
20 | 20 | | |||
21 | #include "common.h" | 21 | #include "common.h" | ||
22 | #include <QColor> | 22 | #include <QColor> | ||
23 | #include <QSize> | 23 | #include <QSize> | ||
24 | #include <QStringList> | 24 | #include <QStringList> | ||
25 | #include <QTextStream> | 25 | #include <QTextStream> | ||
26 | #include <map> | 26 | #include <map> | ||
▲ Show 20 Lines • Show All 155 Lines • ▼ Show 20 Line(s) | 172 | { | |||
182 | { | 182 | { | ||
183 | int pos2 = s.indexOf(sep, pos); | 183 | int pos2 = s.indexOf(sep, pos); | ||
184 | if(pos2 > 0) | 184 | if(pos2 > 0) | ||
185 | return s.mid(pos, pos2 - pos); | 185 | return s.mid(pos, pos2 - pos); | ||
186 | else | 186 | else | ||
187 | return s.mid(pos); | 187 | return s.mid(pos); | ||
188 | } | 188 | } | ||
189 | 189 | | |||
190 | return ""; | 190 | return QString(); | ||
191 | } | 191 | } | ||
192 | 192 | | |||
193 | static int num(QString& s, int idx) | 193 | static int num(QString& s, int idx) | ||
194 | { | 194 | { | ||
195 | return subSection(s, idx, ',').toInt(); | 195 | return subSection(s, idx, ',').toInt(); | ||
196 | } | 196 | } | ||
197 | 197 | | |||
198 | void ValueMap::writeEntry(const QString& k, const QFont& v) | 198 | void ValueMap::writeEntry(const QString& k, const QFont& v) | ||
▲ Show 20 Lines • Show All 184 Lines • Show Last 20 Lines |