!16 解决wayland下应用打开过程中阻塞开始菜单问题
Merge pull request !16 from lixueman/openkylin/yangtze
This commit is contained in:
commit
d2c9b3bab8
|
@ -1,3 +1,9 @@
|
|||
ukui-menu (3.1.1-ok4~0831) yangtze; urgency=medium
|
||||
|
||||
* close-cd # 131373 【wayland】【软件更新器】点击打开软件更新器后,开始菜单过6s左右才退出;
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Wed, 31 Aug 2022 00:52:08 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~0818) yangtze; urgency=medium
|
||||
|
||||
* close-cd #125159 修改全屏下固定到收藏不生效问题
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "klistview.h"
|
||||
#include "utility.h"
|
||||
#include <QScrollBar>
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
#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<QString>();
|
||||
Q_EMIT sendHideMainWindowSignal();
|
||||
execApp(desktopfp);
|
||||
QtConcurrent::run(execApp, QString(desktopfp));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "utility.h"
|
||||
#include <QDebug>
|
||||
#include <QDesktopServices>
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <syslog.h>
|
||||
#include <QPushButton>
|
||||
#include <QGSettings>
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
|
||||
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<QStringList>().at(0);
|
||||
if (var.isValid()) {
|
||||
QString desktopfp = var.value<QString>();
|
||||
execApp(desktopfp);
|
||||
Q_EMIT sendHideMainWindowSignal();
|
||||
QtConcurrent::run(execApp, QString(desktopfp));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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<QStringList> arg)
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <QApplication>
|
||||
#include <QDBusInterface>
|
||||
#include <QScreen>
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
#include "ukuimenuinterface.h"
|
||||
|
||||
#define DATABASENAME QDir::homePath()+"/.config/ukui/"+"UkuiMenu.db"
|
||||
|
@ -710,14 +711,16 @@ bool deleteAppRecord(QString desktopfn)
|
|||
|
||||
void execApp(QString desktopfp)
|
||||
{
|
||||
QDBusReply<bool> 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<bool> res = iface.call("LaunchApp", desktopfp);
|
||||
|
||||
if (!res.isValid() || !res) {
|
||||
if (!result.isValid() || !result) {
|
||||
|
||||
UkuiMenuInterface interface;
|
||||
|
||||
|
|
Loading…
Reference in New Issue