diff options
Diffstat (limited to 'src/dgedit.cc')
-rw-r--r-- | src/dgedit.cc | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/dgedit.cc b/src/dgedit.cc index c511150..3984f5a 100644 --- a/src/dgedit.cc +++ b/src/dgedit.cc @@ -25,31 +25,19 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include <QApplication> -#include <QLocale> -#include <QTranslator> - -#include <iostream> #include "mainwindow.h" +#include "settings.h" +#include "localehandler.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); - QTranslator translator; - QString locale = QLocale().name().section('_', 0, 0); - if(!locale.isEmpty() && locale != "C") - { - QString file = LOCALEDIR"/dgedit_" + locale + ".qm"; - std::cout << file.toStdString() << std::endl; - if(QFile::exists(file)) - { - translator.load(file); - app.installTranslator(&translator); - } - } + LocaleHandler locale(app); - MainWindow wnd; + Settings settings; + MainWindow wnd(settings); wnd.show(); return app.exec(); |