1
0
mirror of https://github.com/altlinux/admc.git synced 2024-10-27 01:55:37 +03:00

remove admc

This commit is contained in:
Dmitry Degtyarev 2020-07-15 17:27:23 +04:00
parent 0a93b64874
commit 34f39795f7
6 changed files with 17 additions and 83 deletions

View File

@ -47,7 +47,6 @@ set(ADMC_HEADER_DIRS
set(ADMC_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/admc.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/ad_interface.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/details_widget.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/attributes_widget.cpp

View File

@ -19,7 +19,6 @@
#include "ad_interface.h"
#include "ad_connection.h"
#include "admc.h"
#include <QSet>

View File

@ -1,27 +0,0 @@
/*
* ADMC - AD Management Center
*
* Copyright (C) 2020 BaseALT Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "admc.h"
#include "ad_interface.h"
ADMC::ADMC(int& argc, char** argv)
: QApplication(argc, argv)
{
}

View File

@ -1,37 +0,0 @@
/*
* ADMC - AD Management Center
*
* Copyright (C) 2020 BaseALT Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#if !defined(__ADMC_APPLICATION_H)
#define __ADMC_APPLICATION_H 1
#include <QApplication>
class AdInterface;
class ADMC final: public QApplication {
Q_OBJECT
public:
ADMC(int& argc, char** argv);
private:
};
#endif /* __ADMC_APPLICATION_H */

View File

@ -18,29 +18,22 @@
*/
#include "config.h"
#include "admc.h"
#include "main_window.h"
#include "ad_interface.h"
#include "settings.h"
#include <QApplication>
#include <QCommandLineParser>
#include <QStringList>
int main(int argc, char **argv) {
const auto admc = new ADMC(argc, argv);
admc->setApplicationDisplayName(ADMC_APPLICATION_DISPLAY_NAME);
admc->setApplicationName(ADMC_APPLICATION_NAME);
admc->setApplicationVersion(ADMC_VERSION);
admc->setOrganizationName(ADMC_ORGANIZATION);
admc->setOrganizationDomain(ADMC_ORGANIZATION_DOMAIN);
// NOTE: must load settings after setting app/org names so that
// settings file path is correct
Settings::instance.load_settings();
QObject::connect(
admc, &QCoreApplication::aboutToQuit,
&Settings::instance, &Settings::save_settings);
QApplication app(argc, argv);
app.setApplicationDisplayName(ADMC_APPLICATION_DISPLAY_NAME);
app.setApplicationName(ADMC_APPLICATION_NAME);
app.setApplicationVersion(ADMC_VERSION);
app.setOrganizationName(ADMC_ORGANIZATION);
app.setOrganizationDomain(ADMC_ORGANIZATION_DOMAIN);
QCommandLineParser cli_parser;
cli_parser.setApplicationDescription(QCoreApplication::applicationName());
cli_parser.addHelpOption();
@ -71,10 +64,18 @@ int main(int argc, char **argv) {
return 0;
} else {
// GUI
// NOTE: must load settings after setting app/org names so that
// settings file path is correct
Settings::instance.load_settings();
QObject::connect(
&app, &QCoreApplication::aboutToQuit,
&Settings::instance, &Settings::save_settings);
MainWindow main_window;
main_window.show();
const int retval = admc->exec();
const int retval = app.exec();
return retval;
}

View File

@ -18,7 +18,6 @@
*/
#include "settings.h"
#include "admc.h"
#include <QAction>
#include <QSettings>