@@ -7,9 +7,10 @@ QHash<QListWidgetItem*,QString> execData;
7
7
QHash<QListWidgetItem*,QString> favExecData;
8
8
QVariantList __favDesktopFiles__;
9
9
10
- menuUI AppMenu::__createUI__ (PanelLocation location, short panelHeight, QFont font,
11
- short buttonX, short buttonXRight, bool triangularTabs,
12
- QString accent, QString theme, qreal opacity) {
10
+ menuUI AppMenu::__createUI__ (QWidget* parent, PanelLocation location, short panelHeight,
11
+ QFont font, short buttonX, short buttonXRight,
12
+ bool triangularTabs, QString accent, QString theme,
13
+ qreal opacity) {
13
14
QWidget* appMenuWidget = new QWidget;
14
15
appMenuWidget->setObjectName (" appMenu" );
15
16
appMenuWidget->setWindowTitle (" plainPanel App Menu" );
@@ -126,18 +127,18 @@ menuUI AppMenu::__createUI__(PanelLocation location, short panelHeight, QFont fo
126
127
});
127
128
128
129
allAppsTab->connect (menuAppsList, &QListWidget::itemDoubleClicked, allAppsTab,
129
- [menuAppsList, appMenuWidget, this ]() {
130
- execApp (execData[menuAppsList->selectedItems ()[0 ]], appMenuWidget);
130
+ [parent, menuAppsList, appMenuWidget, this ]() {
131
+ execApp (parent, execData[menuAppsList->selectedItems ()[0 ]], appMenuWidget);
131
132
});
132
133
133
134
favAppsTab->connect (favAppsList, &QListWidget::itemDoubleClicked, favAppsTab,
134
- [favAppsList, appMenuWidget, this ]() {
135
- execApp (favExecData[favAppsList->selectedItems ()[0 ]], appMenuWidget);
135
+ [parent, favAppsList, appMenuWidget, this ]() {
136
+ execApp (parent, favExecData[favAppsList->selectedItems ()[0 ]], appMenuWidget);
136
137
});
137
138
138
139
runTab->connect (runPushButton, &QPushButton::clicked, runTab,
139
- [cmdLineEdit, appMenuWidget, this ]() {
140
- execApp (cmdLineEdit->text (), appMenuWidget);
140
+ [parent, cmdLineEdit, appMenuWidget, this ]() {
141
+ execApp (parent, cmdLineEdit->text (), appMenuWidget);
141
142
cmdLineEdit->clear ();
142
143
});
143
144
@@ -178,8 +179,8 @@ App AppMenu::readDesktopFile(QString pathToCurrentDesktopFile) {
178
179
}
179
180
180
181
181
- void AppMenu::execApp (QString exec, QWidget* appMenuWidget) {
182
- QProcess* process = new QProcess (appMenuWidget );
182
+ void AppMenu::execApp (QWidget* parent, QString exec, QWidget* appMenuWidget) {
183
+ QProcess* process = new QProcess (parent );
183
184
184
185
/* https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html
185
186
* 'The Exec key' */
0 commit comments