Don't block the process while showing the dialog

Otherwise it's not possible to interact with the system tray while the
dialog is open.
This commit is contained in:
Aleix Pol 2017-05-25 00:16:05 +02:00
parent abfa8c8183
commit ecd4f81840

View file

@ -69,9 +69,10 @@ int main(int argc, char** argv)
menu->clear(); menu->clear();
auto configure = menu->addAction(i18n("Configure...")); auto configure = menu->addAction(i18n("Configure..."));
QObject::connect(configure, &QAction::triggered, configure, [](){ QObject::connect(configure, &QAction::triggered, configure, [](){
KCMultiDialog dialog; KCMultiDialog* dialog = new KCMultiDialog;
dialog.addModule("kcm_kdeconnect"); dialog->addModule("kcm_kdeconnect");
dialog.exec(); dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();
}); });
for (int i=0, count = model.rowCount(); i<count; ++i) { for (int i=0, count = model.rowCount(); i<count; ++i) {
DeviceDbusInterface* device = model.getDevice(i); DeviceDbusInterface* device = model.getDevice(i);