summaryrefslogtreecommitdiffstats
path: root/qt-gui.cpp
diff options
context:
space:
mode:
authorGravatar Sergey Starosek <sergey.starosek@gmail.com>2014-07-16 20:35:22 +0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-16 13:58:06 -0700
commit14cc59898a9b6405ba239919137a5c57e7e6e0d0 (patch)
treedf935a4514ef1f6bb1c434d6625207a51c87f1e7 /qt-gui.cpp
parent0dd40b7a514a2ea02c2f4160a74b23c0fb9a41dd (diff)
downloadsubsurface-14cc59898a9b6405ba239919137a5c57e7e6e0d0.tar.gz
Date picker l10n for profile and planner
- set application-wide locale from preferences - use custom date format for display Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-gui.cpp')
-rw-r--r--qt-gui.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-gui.cpp b/qt-gui.cpp
index 4dc21e88f..68f65e76a 100644
--- a/qt-gui.cpp
+++ b/qt-gui.cpp
@@ -108,6 +108,11 @@ QLocale getLocale()
return loc;
}
+QString getDateFormat()
+{
+ return dateFormat;
+}
+
void init_ui(void)
{
// tell Qt to use system proxies
@@ -135,6 +140,7 @@ void init_ui(void)
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath());
QLocale loc;
QString uiLang = uiLanguage(&loc);
+ QLocale::setDefault(loc);
// we don't have translations for English - if we don't check for this
// Qt will proceed to load the second language in preference order - not what we want