diff --git a/src/windowedframe.cpp b/src/windowedframe.cpp index 09b47f31d719172220dc4740cc199f214b09613e..cf620cf7530261cda490226b16cec7a6587b76a9 100644 --- a/src/windowedframe.cpp +++ b/src/windowedframe.cpp @@ -435,33 +435,16 @@ void WindowedFrame::uninstallApp(const QModelIndex &context) } UNINSTALL_DIALOG_SHOWN = true; - DTK_WIDGET_NAMESPACE::DDialog unInstallDialog; - unInstallDialog.setWindowFlags(Qt::Dialog | unInstallDialog.windowFlags()); - unInstallDialog.setWindowModality(Qt::WindowModal); const QString appKey = context.data(AppsListModel::AppKeyRole).toString(); - QString appName = context.data(AppsListModel::AppNameRole).toString(); - unInstallDialog.setTitle(QString(tr("Are you sure you want to uninstall %1 ?")).arg(appName)); - QPixmap appIcon = context.data(AppsListModel::AppDialogIconRole).value(); - unInstallDialog.setIconPixmap(appIcon); - - QStringList buttons; - buttons << tr("Cancel") << tr("Confirm"); - unInstallDialog.addButtons(buttons); - - connect(&unInstallDialog, &DTK_WIDGET_NAMESPACE::DDialog::buttonClicked, [&] (int clickedResult) { - // 0 means "cancel" button clicked - if (clickedResult == 0) { - return; - } + m_appsManager->uninstallApp(appKey); - }); + // hide frame QTimer::singleShot(1, this, &WindowedFrame::hideLauncher); - unInstallDialog.exec(); UNINSTALL_DIALOG_SHOWN = false; }