diff --git a/debian/changelog b/debian/changelog index 395da66..9184f9a 100755 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ukui-menu (3.1.1-ok4~0831) yangtze; urgency=medium + + * close-cd # 131373 【wayland】【软件更新器】点击打开软件更新器后,开始菜单过6s左右才退出; + + -- lixueman Wed, 31 Aug 2022 00:52:08 +0800 + ukui-menu (3.1.1-ok4~0818) yangtze; urgency=medium * close-cd #125159 修改全屏下固定到收藏不生效问题 diff --git a/src/UserInterface/ListView/klistview.cpp b/src/UserInterface/ListView/klistview.cpp index fcf4480..1588014 100755 --- a/src/UserInterface/ListView/klistview.cpp +++ b/src/UserInterface/ListView/klistview.cpp @@ -2,6 +2,7 @@ #include "klistview.h" #include "utility.h" #include +#include #include "rightclickmenu.h" KListView::KListView(QWidget *parent): @@ -42,11 +43,10 @@ void KListView::updateData(QStringList data) void KListView::onClicked(QModelIndex index) { QVariant var = listmodel->data(index, Qt::DisplayRole); - if (var.isValid()) { QString desktopfp = var.value(); Q_EMIT sendHideMainWindowSignal(); - execApp(desktopfp); + QtConcurrent::run(execApp, QString(desktopfp)); } } diff --git a/src/UserInterface/ListView/listview.cpp b/src/UserInterface/ListView/listview.cpp index 368f25a..ea511c2 100755 --- a/src/UserInterface/ListView/listview.cpp +++ b/src/UserInterface/ListView/listview.cpp @@ -21,6 +21,7 @@ #include "utility.h" #include #include +#include ListView::ListView(QWidget *parent/*, int width, int height, int module*/): KListView(parent) @@ -108,7 +109,7 @@ void ListView::onClicked(QModelIndex index) Q_EMIT sendAppClassificationBtnClicked(); } else { Q_EMIT sendHideMainWindowSignal(); - execApp(desktopfp); + QtConcurrent::run(execApp, QString(desktopfp)); } } } diff --git a/src/UserInterface/ListView/rightlistview.cpp b/src/UserInterface/ListView/rightlistview.cpp index 7725222..5a456bb 100755 --- a/src/UserInterface/ListView/rightlistview.cpp +++ b/src/UserInterface/ListView/rightlistview.cpp @@ -22,6 +22,7 @@ #include #include #include +#include RightListView::RightListView(QWidget *parent): KListView(parent) @@ -128,12 +129,12 @@ void RightListView::keyPressEvent(QKeyEvent *e) void RightListView::onClicked(QModelIndex index) { - Q_EMIT sendHideMainWindowSignal(); QVariant var = listmodel->data(index, Qt::DisplayRole); QString desktopfp = var.value().at(0); if (var.isValid()) { QString desktopfp = var.value(); - execApp(desktopfp); + Q_EMIT sendHideMainWindowSignal(); + QtConcurrent::run(execApp, QString(desktopfp)); } } diff --git a/src/UserInterface/Widget/full_commonuse_widget.cpp b/src/UserInterface/Widget/full_commonuse_widget.cpp index 6f138f1..05d9d14 100755 --- a/src/UserInterface/Widget/full_commonuse_widget.cpp +++ b/src/UserInterface/Widget/full_commonuse_widget.cpp @@ -147,7 +147,6 @@ void FullCommonUseWidget::initAppListWidget() m_listView->installEventFilter(this); m_scrollAreaWidLayout->addWidget(m_listView); m_listView->setFixedWidth(m_scrollAreaWid->width()); - connect(m_listView, &FullListView::sendItemClickedSignal, this, &FullCommonUseWidget::execApplication); connect(m_listView, &FullListView::sendUpdateAppListSignal, this, &FullCommonUseWidget::updateListViewSlot); connect(m_listView, &FullListView::sendCollectViewUpdate, this, &FullCommonUseWidget::sendCollectViewUpdate); connect(m_listView, &FullListView::sendHideMainWindowSignal, this, &FullCommonUseWidget::sendHideMainWindowSignal); @@ -185,15 +184,6 @@ void FullCommonUseWidget::fillAppList() resizeScrollAreaControls(); } -/** - * 执行应用程序 - */ -void FullCommonUseWidget::execApplication(QString desktopfp) -{ - Q_EMIT sendHideMainWindowSignal(); - execApp(desktopfp); -} - void FullCommonUseWidget::selectFirstItem() { m_listView->setCurrentIndex(m_listView->model()->index(0, 0)); diff --git a/src/UserInterface/Widget/full_commonuse_widget.h b/src/UserInterface/Widget/full_commonuse_widget.h index d13ad45..cfce3da 100755 --- a/src/UserInterface/Widget/full_commonuse_widget.h +++ b/src/UserInterface/Widget/full_commonuse_widget.h @@ -102,11 +102,6 @@ protected: bool eventFilter(QObject *watched, QEvent *event); public Q_SLOTS: - /** - * @brief Open the application - * @param arg: Desktop file path - */ - void execApplication(QString desktopfp); /** * @brief Update the application list slot function */ diff --git a/src/UserInterface/Widget/full_function_widget.cpp b/src/UserInterface/Widget/full_function_widget.cpp index b07133f..09cc615 100755 --- a/src/UserInterface/Widget/full_function_widget.cpp +++ b/src/UserInterface/Widget/full_function_widget.cpp @@ -208,21 +208,11 @@ void FullFunctionWidget::insertAppList(QStringList desktopfplist) } listview->addData(m_data); - connect(listview, &FullListView::sendItemClickedSignal, this, &FullFunctionWidget::execApplication); connect(listview, &FullListView::sendHideMainWindowSignal, this, &FullFunctionWidget::sendHideMainWindowSignal); connect(listview, &FullListView::sendUpdateAppListSignal, this, &FullFunctionWidget::sendUpdateCommonView); connect(listview, &FullListView::sendCollectViewUpdate, this, &FullFunctionWidget::sendCollectViewUpdate); } -/** - * 执行应用程序 - */ -void FullFunctionWidget::execApplication(QString desktopfp) -{ - Q_EMIT sendHideMainWindowSignal(); - execApp(desktopfp); -} - void FullFunctionWidget::on_setAreaScrollBarValue(int value) { // m_scrollArea->verticalScrollBar()->setMaximum(maxmumValue); diff --git a/src/UserInterface/Widget/full_function_widget.h b/src/UserInterface/Widget/full_function_widget.h index 22e2a99..88493a0 100755 --- a/src/UserInterface/Widget/full_function_widget.h +++ b/src/UserInterface/Widget/full_function_widget.h @@ -142,11 +142,6 @@ protected: bool eventFilter(QObject *watched, QEvent *event); public Q_SLOTS: - /** - * @brief Open the application - * @param arg: Desktop file path - */ - void execApplication(QString desktopfp); /** * @brief Respond to button click * @param btn: QButtonGroup button diff --git a/src/UserInterface/Widget/full_letter_widget.cpp b/src/UserInterface/Widget/full_letter_widget.cpp index 64e7537..bd51f38 100755 --- a/src/UserInterface/Widget/full_letter_widget.cpp +++ b/src/UserInterface/Widget/full_letter_widget.cpp @@ -206,7 +206,6 @@ void FullLetterWidget::fillAppList() } listview->addData(m_data); - connect(listview, &FullListView::sendItemClickedSignal, this, &FullLetterWidget::execApplication); connect(listview, &FullListView::sendHideMainWindowSignal, this, &FullLetterWidget::sendHideMainWindowSignal); connect(listview, &FullListView::sendUpdateAppListSignal, this, &FullLetterWidget::sendUpdateCommonView); connect(listview, &FullListView::sendCollectViewUpdate, this, &FullLetterWidget::sendCollectViewUpdate); @@ -216,15 +215,6 @@ void FullLetterWidget::fillAppList() resizeScrollAreaControls(); } -/** - * 执行应用程序 - */ -void FullLetterWidget::execApplication(QString desktopfp) -{ - Q_EMIT sendHideMainWindowSignal(); - execApp(desktopfp); -} - void FullLetterWidget::on_setAreaScrollBarValue(int value) { // m_scrollArea->verticalScrollBar()->setMaximum(maxmumValue); diff --git a/src/UserInterface/Widget/full_letter_widget.h b/src/UserInterface/Widget/full_letter_widget.h index 9799ee4..72c25a0 100755 --- a/src/UserInterface/Widget/full_letter_widget.h +++ b/src/UserInterface/Widget/full_letter_widget.h @@ -147,11 +147,6 @@ public Q_SLOTS: * @param btn: QButtonGroup button */ void btnGroupClickedSlot(QAbstractButton *btn); - /** - * @brief Open the application - * @param arg: Desktop file path - */ - void execApplication(QString desktopfp); /** * @brief Update application list slot function */ diff --git a/src/UserInterface/Widget/full_searchresult_widget.cpp b/src/UserInterface/Widget/full_searchresult_widget.cpp index e42d151..a37fc83 100755 --- a/src/UserInterface/Widget/full_searchresult_widget.cpp +++ b/src/UserInterface/Widget/full_searchresult_widget.cpp @@ -136,7 +136,6 @@ void FullSearchResultWidget::initAppListWidget() m_listView->installEventFilter(this); m_scrollAreaWidLayout->addWidget(m_listView); m_listView->setFixedWidth(m_scrollArea->width()); - connect(m_listView, &FullListView::sendItemClickedSignal, this, &FullSearchResultWidget::execApplication); connect(m_listView, &FullListView::sendHideMainWindowSignal, this, &FullSearchResultWidget::sendHideMainWindowSignal); connect(m_listView, &FullListView::sendSetslidebar, this, &FullSearchResultWidget::onSetSlider); connect(m_listView, &FullListView::sendCollectViewUpdate, this, &FullSearchResultWidget::sendCollectViewUpdate); @@ -148,14 +147,6 @@ void FullSearchResultWidget::fillAppList() m_listView->addData(m_data); resizeScrollAreaControls(); } -/** - * 执行应用程序 - */ -void FullSearchResultWidget::execApplication(QString desktopfp) -{ - Q_EMIT sendHideMainWindowSignal(); - execApp(desktopfp); -} void FullSearchResultWidget::updateAppListView(QVector arg) { diff --git a/src/UserInterface/Widget/full_searchresult_widget.h b/src/UserInterface/Widget/full_searchresult_widget.h index e557b7d..73a42df 100755 --- a/src/UserInterface/Widget/full_searchresult_widget.h +++ b/src/UserInterface/Widget/full_searchresult_widget.h @@ -90,11 +90,6 @@ protected: bool eventFilter(QObject *watched, QEvent *event); public Q_SLOTS: - /** - * @brief Open the application - * @param arg: Desktop file path - */ - void execApplication(QString desktopfp); void selectFirstItemTab(); diff --git a/src/UtilityFunction/utility.cpp b/src/UtilityFunction/utility.cpp index 40c6f08..1e320a3 100755 --- a/src/UtilityFunction/utility.cpp +++ b/src/UtilityFunction/utility.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include "ukuimenuinterface.h" #define DATABASENAME QDir::homePath()+"/.config/ukui/"+"UkuiMenu.db" @@ -710,14 +711,16 @@ bool deleteAppRecord(QString desktopfn) void execApp(QString desktopfp) { + QDBusReply result; + if (QDBusConnection::connectToBus(QDBusConnection::SessionBus, QString("com.kylin.AppManager")).isConnected()) { + QDBusInterface iface("com.kylin.AppManager", "/com/kylin/AppManager", "com.kylin.AppManager"); + if (iface.isValid()) { + result = iface.call("LaunchApp", desktopfp); + myDebug() << "LaunchApp desktopFile:" << desktopfp; + } + } - QDBusInterface iface("com.kylin.AppManager", - "/com/kylin/AppManager", - "com.kylin.AppManager", - QDBusConnection::sessionBus()); - QDBusReply res = iface.call("LaunchApp", desktopfp); - - if (!res.isValid() || !res) { + if (!result.isValid() || !result) { UkuiMenuInterface interface;