diff --git a/src/frame/qqtapplication.cpp b/src/frame/qqtapplication.cpp index de49a9fc..27494c37 100644 --- a/src/frame/qqtapplication.cpp +++ b/src/frame/qqtapplication.cpp @@ -18,6 +18,8 @@ #include #endif +QQtApplication* qqtApp = NULL; + QQtApplication::QQtApplication ( int& argc, char** argv ) : QApplication ( argc, argv ), bUPanAutoRun ( false ) @@ -39,6 +41,8 @@ QQtApplication::QQtApplication ( int& argc, char** argv ) : QSettings::setPath ( QSettings::IniFormat, QSettings::UserScope, CONFIG_PATH ); QSettings::setPath ( QSettings::IniFormat, QSettings::SystemScope, CONFIG_PATH ); + qqtApp = this; + #ifdef __DARWIN__ QDir::setCurrent ( qApp->applicationDirPath() ); #endif @@ -215,4 +219,5 @@ void QQtApplication::setLanguage ( QString qmfile ) language->load ( qmfile ); pline() << "currentLanguage" << qmfile; installTranslator ( language ); + emit languageChanged(); } diff --git a/src/frame/qqtapplication.h b/src/frame/qqtapplication.h index aa90d634..b0b909d7 100644 --- a/src/frame/qqtapplication.h +++ b/src/frame/qqtapplication.h @@ -28,7 +28,7 @@ public: virtual int unInitInstance() { return 0; } signals: - + void languageChanged(); public slots: void slotUPanAutoRun ( int status ); private: @@ -38,4 +38,6 @@ private: QTranslator* language; }; +extern QQtApplication* qqtApp; + #endif // QQTAPPLICATION_H