mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-09 20:05:53 +00:00
commit before starting work on helper
This commit is contained in:
@ -60,4 +60,5 @@ endif()
|
||||
add_executable (${SUBPROJECT} ${UI_HEADERS} ${HEADERS} ${SOURCES} ${MOC_SOURCES} ${QRC_SOURCES} ${TRANSLATIONS})
|
||||
target_link_libraries (${SUBPROJECT} ${PROJECT_LIBRARY} ${QT_NEEDED_LIBS})
|
||||
# install properties
|
||||
install (TARGETS ${SUBPROJECT} DESTINATION bin)
|
||||
install (TARGETS ${SUBPROJECT} DESTINATION bin
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE SETUID)
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <QApplication>
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusMessage>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QTranslator>
|
||||
#include <iostream>
|
||||
@ -54,6 +55,10 @@ int main(int argc, char *argv[])
|
||||
daemon(0, 0);
|
||||
break;
|
||||
}
|
||||
#if QT_VERSION >= 0x050000
|
||||
QApplication::setSetuidAllowed(true);
|
||||
qDebug() << QApplication::isSetuidAllowed();
|
||||
#endif
|
||||
QApplication a(argc, argv);
|
||||
QApplication::setQuitOnLastWindowClosed(false);
|
||||
// check if exists
|
||||
|
@ -52,6 +52,9 @@
|
||||
#include "vlanwidget.h"
|
||||
#include "wirelesswidget.h"
|
||||
|
||||
#include <polkit-qt5-1/polkitqt1-authority.h>
|
||||
#include <polkit-qt5-1/polkitqt1-subject.h>
|
||||
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent,
|
||||
const QMap<QString, QVariant> args,
|
||||
@ -78,7 +81,6 @@ MainWindow::MainWindow(QWidget *parent,
|
||||
isDaemon = true;
|
||||
else
|
||||
isDaemon = false;
|
||||
createDBusSession();
|
||||
updateConfiguration(args);
|
||||
|
||||
// main actions
|
||||
@ -117,7 +119,6 @@ MainWindow::~MainWindow()
|
||||
{
|
||||
if (debug) qDebug() << "[MainWindow]" << "[~MainWindow]";
|
||||
|
||||
QDBusConnection::sessionBus().unregisterService(QString(DBUS_SERVICE));
|
||||
deleteObjects();
|
||||
}
|
||||
|
||||
@ -294,6 +295,7 @@ void MainWindow::createObjects()
|
||||
if (debug) qDebug() << "[MainWindow]" << "[createObjects]";
|
||||
|
||||
// backend
|
||||
createDBusSession();
|
||||
netctlCommand = new Netctl(debug, configuration);
|
||||
netctlProfile = new NetctlProfile(debug, configuration);
|
||||
wpaCommand = new WpaSup(debug, configuration);
|
||||
@ -340,6 +342,7 @@ void MainWindow::deleteObjects()
|
||||
{
|
||||
if (debug) qDebug() << "[MainWindow]" << "[deleteObjects]";
|
||||
|
||||
QDBusConnection::sessionBus().unregisterService(QString(DBUS_SERVICE));
|
||||
if (netctlCommand != nullptr) delete netctlCommand;
|
||||
if (netctlProfile != nullptr) delete netctlProfile;
|
||||
if (wpaCommand != nullptr) delete wpaCommand;
|
||||
|
@ -19,7 +19,9 @@
|
||||
#define MESSAGES_H
|
||||
|
||||
#include <QChar>
|
||||
#include <QMap>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
|
||||
|
||||
QString errorMessage();
|
||||
|
Reference in New Issue
Block a user