diff -Naur indicator-china-weather-3.1.0/data/org.china-weather-data.gschema.xml indicator-china-weather-3.1.0~/data/org.china-weather-data.gschema.xml --- indicator-china-weather-3.1.0/data/org.china-weather-data.gschema.xml 2021-11-27 03:59:19.000000000 +0800 +++ indicator-china-weather-3.1.0~/data/org.china-weather-data.gschema.xml 2021-12-07 16:56:56.281416120 +0800 @@ -10,5 +10,10 @@ thisweather current weather of this city + + "auto" + "record theme mode" + record theme mode.there's three mode.auto,lightonly and darkonly + diff -Naur indicator-china-weather-3.1.0/debian/changelog indicator-china-weather-3.1.0~/debian/changelog --- indicator-china-weather-3.1.0/debian/changelog 2021-11-27 03:59:18.000000000 +0800 +++ indicator-china-weather-3.1.0~/debian/changelog 2021-12-07 16:56:54.918395675 +0800 @@ -1,3 +1,17 @@ +indicator-china-weather (3.1.0-36) v101; urgency=medium + + * 修复了一处因为gsetting文件初始化问题引起的严重BUG + + -- shixiaoshuo Fri,8 Jan 2021 10:33:00 +0800 + +indicator-china-weather (3.1.0-35) v101; urgency=medium + + * 菜单按钮功能上线。 + * 修复高危BUG#32077 按钮位置异常 + * 修复高优先BUG#30941 关于按钮无反应 + + -- shixiaoshuo Thu,7 Jan 2021 10:33:00 +0800 + indicator-china-weather (3.1.0-34) v101; urgency=medium * 菜单按钮因可能导致功能缺失因此补充上线 diff -Naur indicator-china-weather-3.1.0/src/menumodule.cpp indicator-china-weather-3.1.0~/src/menumodule.cpp --- indicator-china-weather-3.1.0/src/menumodule.cpp 2021-11-27 03:59:19.000000000 +0800 +++ indicator-china-weather-3.1.0~/src/menumodule.cpp 2021-12-07 16:56:56.406417995 +0800 @@ -58,9 +58,9 @@ void menuModule::setThemeFromLocalThemeSetting(QList themeActions) { #if DEBUG_MENUMODULE - confPath = "org.kylin-usb-creator-data.settings"; +// confPath = "org.kylin-usb-creator-data.settings"; #endif - m_pGsettingThemeStatus = new QGSettings(confPath.toLocal8Bit()); + m_pGsettingThemeStatus = new QGSettings(APPDATA); QString appConf = m_pGsettingThemeStatus->get("thememode").toString(); if("lightonly" == appConf){ themeStatus = themeLightOnly; @@ -111,7 +111,7 @@ void menuModule::triggerThemeMenu(QAction *act){ if(!m_pGsettingThemeStatus) { - m_pGsettingThemeStatus = new QGSettings(confPath.toLocal8Bit()); //m_pGsettingThemeStatus指针重复使用避免占用栈空间 + m_pGsettingThemeStatus = new QGSettings(APPDATA); //m_pGsettingThemeStatus指针重复使用避免占用栈空间 } QString str = act->text(); if("Light" == str){ @@ -214,7 +214,7 @@ #if DEBUG_MENUMODULE appVersion = "2020.12.12-test"; #endif - appVersion = "3.1.0-33kord"; + appVersion = "3.1.0-33"; QLabel* bodyIcon = new QLabel(); bodyIcon->setFixedSize(96,96); bodyIcon->setPixmap(QPixmap::fromImage(QImage(iconPath))); diff -Naur indicator-china-weather-3.1.0/src/menumodule.h indicator-china-weather-3.1.0~/src/menumodule.h --- indicator-china-weather-3.1.0/src/menumodule.h 2021-11-27 03:59:19.000000000 +0800 +++ indicator-china-weather-3.1.0~/src/menumodule.h 2021-12-07 16:56:56.431418370 +0800 @@ -1,7 +1,8 @@ #ifndef MENUMODULE_H #define MENUMODULE_H -#define DEBUG_MENUMODULE 1 //DEBUG模式开关,代码上线之前务必关掉 +#define DEBUG_MENUMODULE 0 //DEBUG模式开关,代码上线之前务必关掉 #define FITTHEMEWINDOW "org.ukui.style" +#define APPDATA "org.china-weather-data.settings" #include @@ -41,13 +42,13 @@ QString appVersion = "appVersion字段未填充!"; QString appDesc = "appDesc字段未填充!"; QString iconPath = "iconPath字段未填充!"; - QString confPath = "gsetting文件路径未配置"; + QString confPath = "org.china-weather-data.settings"; private: QMenu *m_menu = nullptr; QMenu *themeMenu = nullptr; QSize iconSize; - QString appPath = "tools/kylin-usb-creator"; //拉起帮助菜单时使用appName字段 +// QString appPath = "tools/kylin-usb-creator"; //拉起帮助菜单时使用appName字段 QWidget *aboutWindow = nullptr; QGSettings *m_pGsettingThemeData = nullptr; QGSettings *m_pGsettingThemeStatus = nullptr;