void QMyServer::_connectSocketSignals () { connect(socket, SIGNAL(encrypted()), this, SLOT(slot_encrypted())); connect(socket, SIGNAL(encryptedBytesWritten(qint64)), this, SLOT(slot_encryptedBytesWritten(qint64))); connect(socket, SIGNAL(modeChanged(QSslSocket::SslMode)), this, SLOT(slot_modeChanged(QSslSocket::SslMode))); connect(socket, SIGNAL(peerVerifyError(const QSslError &)), this, SLOT(slot_peerVerifyError (const QSslError &))); connect(socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(slot_sslErrors(const QList<QSslError> &))); connect(socket, SIGNAL(readyRead()), this, SLOT(slot_readyRead())); connect(socket, SIGNAL(connected()), this, SLOT(slot_connected())); connect(socket, SIGNAL(disconnected()), this, SLOT(slot_disconnected())); connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(slot_error(QAbstractSocket::SocketError))); connect(socket, SIGNAL(hostFound()), this, SLOT(slot_hostFound())); connect(socket, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)), this, SLOT(slot_proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *))); connect(socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(slot_stateChanged(QAbstractSocket::SocketState))); }
bool Audex::check() { if (tmp_dir->error()) { slot_error(i18n("Temporary folder \"%1\" error.", tmp_dir->tmpPath()), i18n("Please check.")); return FALSE; } quint64 free = tmp_dir->freeSpace() / 1024; if (free < 800*1024) { slot_warning(i18n("Free space on temporary folder \"%1\" is less than 800 MiB.", tmp_dir->tmpPathBase())); } else if (free < 200*1024) { slot_error(i18n("Temporary folder \"%1\" needs at least 200 MiB of free space.", tmp_dir->tmpPathBase()), i18n("Please free space or set another path.")); return FALSE; } return TRUE; }
UUpdateWidget::UUpdateWidget(QWidget *parent) : QMainWindow(parent), ui(new Ui::UUpdateWidget) { ui->setupUi(this); this->setAttribute(Qt::WA_DeleteOnClose,true); setFixedSize(size()); ui->menubar->setHidden(true); ui->statusbar->setHidden(true); ui->toolBar->addAction(QPixmap(), "Install updates", this, SLOT(slot_downloadFileFinished())); ui->toolBar->addAction(QPixmap(), "Quit", this, SLOT(slot_closeWidget())); ui->toolBar->addSeparator(); ui->toolBar->addAction(QPixmap(), "Check updates", this, SLOT(slot_checkUpdates())); m_toolBarActions = ui->toolBar->actions(); m_toolBarActions.at(eINSTALL_UPDATES_ACTION)->setEnabled(false); m_stackedWidget = new QStackedWidget(this); m_checkUpdatesWidget = new UCheckUpdatesWidget(m_stackedWidget); m_updatesTableView = new UUpdatesTableView(m_stackedWidget); m_stackedWidget->addWidget(new QWidget(m_stackedWidget)); m_stackedWidget->addWidget(m_checkUpdatesWidget); m_stackedWidget->addWidget(m_updatesTableView); m_stackedWidget->setCurrentIndex(0); setCentralWidget(m_stackedWidget); connect(m_checkUpdatesWidget, SIGNAL(signal_processUpdatesFinished(UUpdatesModel *)), this, SLOT(slot_showUpdatesTable(UUpdatesModel *))); connect(m_checkUpdatesWidget, SIGNAL(signal_downloadFailed(QString)), this, SLOT(slot_checkUpdatesFailed(QString))); m_downloader = new UFileDownloader; connect(m_downloader, SIGNAL(signal_downloadFileFinished()), this, SLOT(slot_downloadFileFinished())); connect(m_downloader, SIGNAL(signal_error(QString)), this, SLOT(slot_error(QString))); m_currentDownloadFile = -1; connect(this, SIGNAL(signal_downloadUpdatesFinished()), this, SLOT(slot_installUpdates())); }
bool Audex::prepare() { if (profile_model->currentProfileIndex() < 0) { slot_error(i18n("No profile selected. Operation abort.")); return FALSE; } kDebug() << "Using profile with index" << profile_model->currentProfileIndex(); tmp_dir = new TmpDir("audex", "work"); tmp_path = tmp_dir->tmpPath(); if (tmp_dir->error()) return FALSE; return TRUE; }