diff options
-rw-r--r-- | core/qthelper.cpp | 9 | ||||
-rw-r--r-- | core/settings/qPrefDisplay.cpp | 2 | ||||
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.cpp | 22 |
3 files changed, 18 insertions, 15 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp index 3738e56f2..b3bf23691 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -39,7 +39,10 @@ const char *existing_filename; static QLocale loc; -static const QString DEGREE_SIGNS("dD" UTF8_DEGREE); +static inline QString degreeSigns() +{ + return QStringLiteral("dD\u00b0"); +} QString weight_string(int weight_in_grams) { @@ -160,7 +163,7 @@ static bool parseCoord(const QString& txt, int& pos, const QString& positives, } else if (others.indexOf(txt[pos]) >= 0) { //we are at the next coordinate. break; - } else if (DEGREE_SIGNS.indexOf(txt[pos]) >= 0 || + } else if (degreeSigns().indexOf(txt[pos]) >= 0 || (txt[pos].isSpace() && !degreesDefined && numberDefined)) { if (!numberDefined) return false; @@ -232,7 +235,7 @@ bool parseGpsText(const QString &gps_text, double *latitude, double *longitude) //remove the useless spaces (but keep the ones separating numbers) static const QRegExp SPACE_CLEANER("\\s*([" + POS_LAT + NEG_LAT + POS_LON + - NEG_LON + DEGREE_SIGNS + "'\"\\s])\\s*"); + NEG_LON + degreeSigns() + "'\"\\s])\\s*"); const QString normalized = gps_text.trimmed().toUpper().replace(SPACE_CLEANER, "\\1"); if (normalized.isEmpty()) { diff --git a/core/settings/qPrefDisplay.cpp b/core/settings/qPrefDisplay.cpp index 6c5be8f3a..46d8d8851 100644 --- a/core/settings/qPrefDisplay.cpp +++ b/core/settings/qPrefDisplay.cpp @@ -15,7 +15,7 @@ QString qPrefDisplay::st_lastDir; static const QString st_lastDir_default = ""; QString qPrefDisplay::st_theme; -static const QString st_theme_default = "Blue"; +static const QString st_theme_default = QStringLiteral("Blue"); QString qPrefDisplay::st_userSurvey; static const QString st_userSurvey_default = ""; diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index c934cdb16..dbb83f356 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -154,20 +154,20 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), ui.scrollArea_2->viewport()->setPalette(p); // GroupBoxes in Gnome3 looks like I'v drawn them... - static const QString gnomeCss( + static const QString gnomeCss = QStringLiteral( "QGroupBox {" - " background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1," - " stop: 0 #E0E0E0, stop: 1 #FFFFFF);" - " border: 2px solid gray;" - " border-radius: 5px;" - " margin-top: 1ex;" + "background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1," + "stop: 0 #E0E0E0, stop: 1 #FFFFFF);" + "border: 2px solid gray;" + "border-radius: 5px;" + "margin-top: 1ex;" "}" "QGroupBox::title {" - " subcontrol-origin: margin;" - " subcontrol-position: top center;" - " padding: 0 3px;" - " background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1," - " stop: 0 #E0E0E0, stop: 1 #FFFFFF);" + "subcontrol-origin: margin;" + "subcontrol-position: top center;" + "padding: 0 3px;" + "background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1," + "stop: 0 #E0E0E0, stop: 1 #FFFFFF);" "}"); Q_FOREACH (QGroupBox *box, findChildren<QGroupBox *>()) { box->setStyleSheet(gnomeCss); |