/*! Constructs a new TestabilityService with \a parent. */ TestabilityService::TestabilityService(QObject* parent) : QObject(parent) { mMessageId = 0; mPaintEventCounter = 0; mServiceManager = 0; mConnected = false; mRegistered = false; mPluginId = QString::number(qApp->applicationPid()); initializeServiceManager(); initializeConnections(); mRegisterTime.setSingleShot(true); connect(&mRegisterTime, SIGNAL(timeout()), this, SLOT(timeout())); loadStartUpParams(TestabilityUtils::getApplicationName()); mRegisterWatchDog.setSingleShot(true); //track paints and register after the first 300 millis pause qApp->installEventFilter(this); mPaintTracker.setSingleShot(true); connect(&mPaintTracker, SIGNAL(timeout()), this, SLOT(registerPlugin())); //After 5 secs force register mRegisterWatchDog.start(5000); connect(&mRegisterWatchDog, SIGNAL(timeout()), this, SLOT(registerPlugin())); }
Clouds::Clouds() #ifdef USE_NITE2 : enable_users_through_filter_(false) #endif { initializeConnections(); }
MainWindow::MainWindow(IntegrityModel* model) : QMainWindow(nullptr), ui(new Ui::mainWnd), m_Presenters(), pModel(model) { ui->setupUi(this); readUserSettings(pModel->getUserSettingsManager()->getGlobalSettings()); m_Presenters.reset(new PresenterManager(this, pModel)); initialize(); initializeConnections(); }
ConnectionEditor::ConnectionEditor(QWidget* parent, Qt::WindowFlags flags) : KXmlGuiWindow(parent, flags) , m_editor(new Ui::ConnectionEditor) , m_handler(new Handler(this)) { QWidget * tmp = new QWidget(this); m_editor->setupUi(tmp); setCentralWidget(tmp); m_editor->connectionsWidget->setSortingEnabled(false); m_editor->connectionsWidget->sortByColumn(0, Qt::AscendingOrder); m_editor->connectionsWidget->setSortingEnabled(true); m_editor->connectionsWidget->setSelectionMode(QAbstractItemView::ExtendedSelection); m_editor->connectionsWidget->setContextMenuPolicy(Qt::CustomContextMenu); m_editor->messageWidget->hide(); m_editor->messageWidget->setCloseButtonVisible(false); m_editor->messageWidget->setWordWrap(true); m_editor->ktreewidgetsearchline->lineEdit()->setPlaceholderText(i18n("Type here to search connections...")); initializeConnections(); initializeMenu(); KSharedConfigPtr config = KSharedConfig::openConfig(); KConfigGroup grp(config, "ConnectionsWidget"); m_editor->connectionsWidget->header()->restoreState(grp.readEntry<QByteArray>("state", QByteArray())); KConfigGroup grp2(config, "General"); if (grp2.isValid()) { if (grp2.readEntry("FirstStart", true)) { importSecretsFromPlainTextFiles(); } grp2.writeEntry("FirstStart", false); } connect(m_editor->connectionsWidget->selectionModel(), &QItemSelectionModel::selectionChanged, this, &ConnectionEditor::slotSelectionChanged); connect(m_editor->connectionsWidget, &QTreeView::doubleClicked, this, &ConnectionEditor::slotItemDoubleClicked); connect(m_editor->connectionsWidget, &QTreeView::customContextMenuRequested, this, &ConnectionEditor::slotContextMenuRequested); connect(m_menu->menu(), &QMenu::triggered, this, static_cast<void (ConnectionEditor::*)(QAction*)>(&ConnectionEditor::addConnection)); connect(NetworkManager::settingsNotifier(), &NetworkManager::SettingsNotifier::connectionAdded, this, &ConnectionEditor::connectionAdded); QLoggingCategory::setFilterRules(QStringLiteral("plasma-nm.debug = false")); QLoggingCategory::setFilterRules(QStringLiteral("plasma-nm.warning = true")); }
/*! Closed all connections and sets the app to not registered state. */ void TestabilityService::connectionClosed() { TasLogger::logger()->error("TestabilityService::connectionClosed was closed"); mRegistered = false; mConnected = false; mRegisterTime.stop(); mSocket->closeConnection(); //Proper fix needed at some point: //for some reason we need to reuse the old connections in symbian (seems to crash or freeze if not) //but in windows the old connections will not work at all and we need to recreate them #ifdef Q_OS_SYMBIAN //for now do nothing #else // make new connections, deleting current once later. Deleting the current object inside the slot // caused random crashes. mSocket->deleteLater(); mServerConnection->deleteLater(); initializeConnections(); #endif mRegisterWatchDog.start(SERVER_REGISTRATION_TIMEOUT); emit unRegistered(); }
QInstallPage::QInstallPage(QWidget * parent, MCompiler *a_m, MCompiler *a_f, MCompiler *a_c, MCompiler *a_cpp) : QWizardPage(parent), ft(0),ct(0), fc(a_f), cc(a_c), cpp(a_cpp), make(a_m), config_file(0), procInstall(0), ntasks(0), n_config_steps(0), i_config_steps(0), n_beam_steps(0), egs_c_utils_ok(false), installing_beam(false), user_aborted(false), skip_config(false) { setTitle("EGSnrc Installation Page"); setSubTitle("Configuring EGSnrc core system"); // the page layout QVBoxLayout *topl = new QVBoxLayout(this); progressBar = new QProgressBar(this); topl->addWidget(progressBar); screen = new QTextEdit();screen->setReadOnly(true);screen->ensureCursorVisible(); topl->addWidget(screen); installButton = new QPushButton("&Install", this); QHBoxLayout *hl = new QHBoxLayout; QGridLayout *checksLayout = new QGridLayout; envCheckBox = new QCheckBox("&Set environment",this); envCheckBox->setToolTip(QString(SET_ENV)); shortcutCheckBox = new QCheckBox("&Desktop shortcuts",this); /* ucCheckBox = new QCheckBox("&Copy user-codes",this); ucCheckBox->setChecked(true); ucCheckBox->setToolTip("Copies tutorials, RZ, and C++ user codes as well as BEAMnrc examples to working area.\n" "BEWARE of overwriting previously modified user codes !!!");*/ /* beamCheckBox = new QCheckBox("&BEAMnrc install",this); beamCheckBox->setChecked(true); beamCheckBox->setToolTip("Configures and builds BEAMnrc system.");*/ checksLayout->addWidget( envCheckBox, 0, 0); checksLayout->addWidget( shortcutCheckBox, 0, 1); //checksLayout->addWidget( ucCheckBox, 0, 2); //checksLayout->addWidget( beamCheckBox, 1, 1); hl->addLayout(checksLayout); hl->addStretch(5); hl->addWidget(installButton); topl->addLayout(hl); connect(installButton,SIGNAL(clicked()),this,SLOT(start())); initializeConnections(); procInstall = new QProcess(this); procInstall->setProcessChannelMode(QProcess::MergedChannels); connect( procInstall, SIGNAL(readyReadStandardOutput()), this, SLOT(procProgress()) ); connect( procInstall, SIGNAL(finished(int , QProcess::ExitStatus)), this, SLOT(procEnd(int , QProcess::ExitStatus)) ); //---------------------------------------------------------------------- // Flags for the building process of the system // NUMBER_OF_STEPS is last element of the enum BuildSteps in egs_install.h //---------------------------------------------------------------------- buildOK = new bool[NUMBER_OF_STEPS ]; for ( ushort i2 = 0; i2 < NUMBER_OF_STEPS; i2++){ buildOK[i2] = true; } //skip_config = !needsTests(); Not working right now. mortran3 compilation uses test results. :-( }