mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-04-24 15:37:23 +00:00
fix kde4 build
fix tray destruction on KF5
This commit is contained in:
parent
a2b1d46900
commit
e4bcfb1653
@ -8,7 +8,7 @@ ProjectRootRelative=./
|
|||||||
|
|
||||||
[CMake][CMake Build Directory 0]
|
[CMake][CMake Build Directory 0]
|
||||||
Build Directory Path=file:///home/arcanis/Documents/github/netctl-gui/build
|
Build Directory Path=file:///home/arcanis/Documents/github/netctl-gui/build
|
||||||
Build Type=Release
|
Build Type=Debug
|
||||||
CMake Binary=file:///usr/bin/cmake
|
CMake Binary=file:///usr/bin/cmake
|
||||||
Environment Profile=
|
Environment Profile=
|
||||||
Extra Arguments=
|
Extra Arguments=
|
||||||
|
@ -148,8 +148,7 @@ void MainWidget::updateMainTab()
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
if (!checkExternalApps(QString("netctl"), configuration, debug)) {
|
if (!checkExternalApps(QString("netctl"), configuration, debug)) {
|
||||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||||
emit(mainWindow->needToBeConfigured());
|
return mainWindow->emitNeedToBeConfigured();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mainWindow->setDisabled(true);
|
mainWindow->setDisabled(true);
|
||||||
@ -299,8 +298,7 @@ void MainWidget::mainTabEnableProfile()
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
if (!checkExternalApps(QString("netctl"), configuration, debug)) {
|
if (!checkExternalApps(QString("netctl"), configuration, debug)) {
|
||||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||||
emit(mainWindow->needToBeConfigured());
|
return mainWindow->emitNeedToBeConfigured();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (ui->tableWidget_main->currentItem() == nullptr) return;
|
if (ui->tableWidget_main->currentItem() == nullptr) return;
|
||||||
|
|
||||||
@ -335,8 +333,7 @@ void MainWidget::mainTabRestartProfile()
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
if (!checkExternalApps(QString("netctl"), configuration, debug)) {
|
if (!checkExternalApps(QString("netctl"), configuration, debug)) {
|
||||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||||
emit(mainWindow->needToBeConfigured());
|
return mainWindow->emitNeedToBeConfigured();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (ui->tableWidget_main->currentItem() == nullptr) return;
|
if (ui->tableWidget_main->currentItem() == nullptr) return;
|
||||||
|
|
||||||
@ -355,8 +352,7 @@ void MainWidget::mainTabStartProfile()
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
if (!checkExternalApps(QString("netctl"), configuration, debug)) {
|
if (!checkExternalApps(QString("netctl"), configuration, debug)) {
|
||||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||||
emit(mainWindow->needToBeConfigured());
|
return mainWindow->emitNeedToBeConfigured();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (ui->tableWidget_main->currentItem() == nullptr) return;
|
if (ui->tableWidget_main->currentItem() == nullptr) return;
|
||||||
|
|
||||||
@ -375,8 +371,7 @@ void MainWidget::mainTabStopAllProfiles()
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
if (!checkExternalApps(QString("netctl"), configuration, debug)) {
|
if (!checkExternalApps(QString("netctl"), configuration, debug)) {
|
||||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||||
emit(mainWindow->needToBeConfigured());
|
return mainWindow->emitNeedToBeConfigured();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mainWindow->setDisabled(true);
|
mainWindow->setDisabled(true);
|
||||||
@ -393,8 +388,7 @@ void MainWidget::mainTabSwitchToProfile()
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
if (!checkExternalApps(QString("netctl"), configuration, debug)) {
|
if (!checkExternalApps(QString("netctl"), configuration, debug)) {
|
||||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||||
emit(mainWindow->needToBeConfigured());
|
return mainWindow->emitNeedToBeConfigured();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (ui->tableWidget_main->currentItem() == nullptr) return;
|
if (ui->tableWidget_main->currentItem() == nullptr) return;
|
||||||
|
|
||||||
|
@ -121,6 +121,14 @@ Qt::ToolBarArea MainWindow::getToolBarArea()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::emitNeedToBeConfigured()
|
||||||
|
{
|
||||||
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
|
emit(needToBeConfigured());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QStringList MainWindow::printSettings()
|
QStringList MainWindow::printSettings()
|
||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
@ -48,6 +48,7 @@ public:
|
|||||||
QTranslator *appTranslator = 0);
|
QTranslator *appTranslator = 0);
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
Qt::ToolBarArea getToolBarArea();
|
Qt::ToolBarArea getToolBarArea();
|
||||||
|
void emitNeedToBeConfigured();
|
||||||
QStringList printSettings();
|
QStringList printSettings();
|
||||||
netctlCurrent printTrayInformation();
|
netctlCurrent printTrayInformation();
|
||||||
bool isHelperActive();
|
bool isHelperActive();
|
||||||
@ -86,9 +87,6 @@ public slots:
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void needToBeConfigured();
|
void needToBeConfigured();
|
||||||
void needShowAboutWindow();
|
|
||||||
void needShowNetctlAutoWindow();
|
|
||||||
void needShowSettingsWindow();
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void setTabByAction(QAction *action);
|
void setTabByAction(QAction *action);
|
||||||
|
@ -41,11 +41,10 @@ TrayIcon::~TrayIcon()
|
|||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
setContextMenu(0);
|
setContextMenu(nullptr);
|
||||||
startProfileMenu->clear();
|
startProfileMenu->clear();
|
||||||
switchToProfileMenu->clear();
|
switchToProfileMenu->clear();
|
||||||
menuActions->clear();
|
menuActions->clear();
|
||||||
delete menuActions;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -100,8 +99,6 @@ void TrayIcon::updateMenu()
|
|||||||
for (int i=0; i<info.profiles.count(); i++)
|
for (int i=0; i<info.profiles.count(); i++)
|
||||||
startProfileMenu->addAction(info.profiles[i]);
|
startProfileMenu->addAction(info.profiles[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// setContextMenu(menuActions);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -184,8 +184,7 @@ void WiFiMenuWidget::updateText(const netctlWifiInfo current)
|
|||||||
if (!wifiTabSetEnabled(checkExternalApps(QString("wpasup-only"), configuration, debug))) return;
|
if (!wifiTabSetEnabled(checkExternalApps(QString("wpasup-only"), configuration, debug))) return;
|
||||||
if (!checkExternalApps(QString("wpasup"), configuration, debug)) {
|
if (!checkExternalApps(QString("wpasup"), configuration, debug)) {
|
||||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||||
emit(mainWindow->needToBeConfigured());
|
return mainWindow->emitNeedToBeConfigured();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
ui->label_wifi->setText(QApplication::translate("WiFiMenuWidget", "Processing..."));
|
ui->label_wifi->setText(QApplication::translate("WiFiMenuWidget", "Processing..."));
|
||||||
|
|
||||||
@ -203,8 +202,7 @@ void WiFiMenuWidget::updateWifiTab()
|
|||||||
if (!wifiTabSetEnabled(checkExternalApps(QString("wpasup-only"), configuration, debug))) return;
|
if (!wifiTabSetEnabled(checkExternalApps(QString("wpasup-only"), configuration, debug))) return;
|
||||||
if (!checkExternalApps(QString("wpasup"), configuration, debug)) {
|
if (!checkExternalApps(QString("wpasup"), configuration, debug)) {
|
||||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||||
emit(mainWindow->needToBeConfigured());
|
return mainWindow->emitNeedToBeConfigured();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mainWindow->setDisabled(true);
|
mainWindow->setDisabled(true);
|
||||||
@ -366,8 +364,7 @@ void WiFiMenuWidget::wifiTabStart()
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
if (!checkExternalApps(QString("wpasup"), configuration, debug)) {
|
if (!checkExternalApps(QString("wpasup"), configuration, debug)) {
|
||||||
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
ErrorWindow::showWindow(1, QString(PDEBUG), debug);
|
||||||
emit(mainWindow->needToBeConfigured());
|
return mainWindow->emitNeedToBeConfigured();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (ui->tableWidget_wifi->currentItem() == nullptr) return;
|
if (ui->tableWidget_wifi->currentItem() == nullptr) return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user