Akonadi
selftestdialog.cpp
79 connect(ui.testView->selectionModel(), &QItemSelectionModel::currentChanged, this, &SelfTestDialog::selectionChanged);
94 QStandardItem *SelfTestDialog::report(ResultType type, const KLocalizedString &summary, const KLocalizedString &details)
135 const QString driver = serverSetting(QStringLiteral("General"), "Driver", QStringLiteral("QMYSQL")).toString();
155 QVariant SelfTestDialog::serverSetting(const QString &group, const char *key, const QVariant &def) const
165 const QString driver = serverSetting(QStringLiteral("General"), "Driver", QStringLiteral("QMYSQL")).toString();
173 bool SelfTestDialog::runProcess(const QString &app, const QStringList &args, QString &result) const
186 const QString driver = serverSetting(QStringLiteral("General"), "Driver", QStringLiteral("QMYSQL")).toString();
189 ki18n("The QtSQL driver '%1' is required by your current Akonadi server configuration and was found on your system.").subs(driver);
208 report(Skip, ki18n("MySQL server executable not tested."), ki18n("The current configuration does not require an internal MySQL server."));
212 const QString driver = serverSetting(QStringLiteral("General"), "Driver", QStringLiteral("QMYSQL")).toString();
213 const QString serverPath = serverSetting(driver, "ServerPath", QString()).toString(); // ### default?
218 "necessary read and execution rights on the server executable. The server executable is typically "
241 const KLocalizedString details = ki18n("Executing the MySQL server '%1' failed with the following error message: '%2'").subs(serverPath).subs(result);
249 report(Skip, ki18n("MySQL server error log not tested."), ki18n("The current configuration does not require an internal MySQL server."));
253 const QString logFileName = StandardDirs::saveDir("data", QStringLiteral("db_data")) + QLatin1String("/mysql.err");
258 ki18n("The MySQL server did not report any errors during this startup. The log can be found in '%1'.").subs(logFileName));
265 ki18n("A MySQL server error log file was found but is not readable: %1").subs(makeLink(logFileName)));
290 ki18n("The MySQL server log file '%1' does not contain any errors or warnings.").subs(makeLink(logFileName)));
300 report(Skip, ki18n("MySQL server configuration not tested."), ki18n("The current configuration does not require an internal MySQL server."));
305 const QString globalConfig = StandardDirs::locateResourceFile("config", QStringLiteral("mysql-global.conf"));
310 ki18n("The default configuration for the MySQL server was found and is readable at %1.").subs(makeLink(globalConfig)));
319 const QString localConfig = StandardDirs::locateResourceFile("config", QStringLiteral("mysql-local.conf"));
328 ki18n("The custom configuration for the MySQL server was found and is readable at %1").subs(makeLink(localConfig)));
347 ki18n("The MySQL server configuration was found at %1 and is readable.").subs(makeLink(actualConfig)));
354 const QString dbname = serverSetting(QStringLiteral("QPSQL"), "Name", QStringLiteral("akonadi")).toString();
355 const QString hostname = serverSetting(QStringLiteral("QPSQL"), "Host", QStringLiteral("localhost")).toString();
357 const QString password = serverSetting(QStringLiteral("QPSQL"), "Password", QString()).toString();
378 report(Success, ki18n("PostgreSQL server found."), ki18n("The PostgreSQL server was found and connection is working."));
414 if (QDBusConnection::sessionBus().interface()->isServiceRegistered(ServerManager::serviceName(ServerManager::Control))) {
417 ki18n("The Akonadi control process is registered at D-Bus which typically indicates it is operational."));
421 ki18n("The Akonadi control process is not registered at D-Bus which typically means it was not started "
425 if (QDBusConnection::sessionBus().interface()->isServiceRegistered(ServerManager::serviceName(ServerManager::Server))) {
428 ki18n("The Akonadi server process is registered at D-Bus which typically indicates it is operational."));
432 ki18n("The Akonadi server process is not registered at D-Bus which typically means it was not started "
442 ki18n("Without a connection to the server it is not possible to check if the protocol version meets the requirements."));
449 "If you recently updated KDE PIM, please make sure to restart both Akonadi and KDE PIM applications.")
456 "If you recently updated KDE PIM, please make sure to restart both Akonadi and KDE PIM applications.")
460 report(Success, ki18n("Server protocol version matches."), ki18n("The current Protocol version is %1.").subs(Internal::serverProtocolVersion()));
478 item = report(Success, ki18n("Resource agents found."), ki18n("At least one resource agent has been found."));
499 report(Success, ki18n("No current Akonadi server error log found."), ki18n("The Akonadi server did not report any errors during its current startup."));
504 ki18n("The Akonadi server reported errors during its current startup. The log can be found in %1.").subs(makeLink(serverLog)));
518 ki18n("The Akonadi server reported errors during its previous startup. The log can be found in %1.").subs(makeLink(serverLog)));
535 ki18n("The Akonadi control process reported errors during its current startup. The log can be found in %1.").subs(makeLink(controlLog)));
549 ki18n("The Akonadi control process reported errors during its previous startup. The log can be found in %1.").subs(makeLink(controlLog)));
560 ki18n("Running Internet-facing applications as root/administrator exposes you to many security risks. MySQL, used by this Akonadi installation, "
565 ki18n("Akonadi is not running as a root/administrator user, which is the recommended setup for a secure system."));
642 QStringLiteral("akonadi-selftest-report-") + QDate::currentDate().toString(QStringLiteral("yyyyMMdd")) + QStringLiteral(".txt");
643 const QString fileName = QFileDialog::getSaveFileName(this, i18n("Save Test Report"), defaultFileName);
void start(const QString &program, const QStringList &arguments, QIODevice::OpenMode mode)
Warning
bool isValid() const const
UserRole
ReadOnly
QString fromUtf8(const char *str, int size)
virtual void reject()
CaseInsensitive
bool waitForFinished(int msecs)
bool open()
void setPort(int port)
bool contains(const QString &str, Qt::CaseSensitivity cs) const const
void clear()
static ServerManager * self()
Returns the singleton instance of this class, for connecting to its signals.
Definition: servermanager.cpp:186
void clicked(bool checked)
QIcon fromTheme(const QString &name)
void stateChanged(Akonadi::ServerManager::State state)
Emitted whenever the server state changes.
static QString serviceName(ServiceType serviceType)
Returns the namespaced D-Bus service name for serviceType.
Definition: servermanager.cpp:335
void setHostName(const QString &host)
Error
QByteArray readAllStandardOutput()
QByteArray toLatin1() const const
bool openUrl(const QUrl &url)
AllEntries
QByteArray toByteArray() const const
QString toString() const
void linkActivated(const QString &link)
IniFormat
QClipboard * clipboard()
QVariant data(int role) const const
QSqlDatabase addDatabase(const QString &type, const QString &connectionName)
NETWORKMANAGERQT_EXPORT QString hostname()
QString i18n(const char *text, const TYPE &arg...)
QDBusConnection sessionBus()
QString fromLocal8Bit(const char *str, int size)
ActionRole
void setDatabaseName(const QString &name)
bool isEmpty() const const
QUrl fromLocalFile(const QString &localFile)
SelfTestDialog(QWidget *parent=nullptr)
Creates a new self test dialog.
int toInt(bool *ok) const const
int toInt(bool *ok, int base) const const
bool isEmpty() const const
void setPassword(const QString &password)
void setUserName(const QString &name)
bool isSuperUser() const
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
KLocalizedString KI18N_EXPORT ki18n(const char *text)
QDate currentDate()
KLocalizedString subs(const KLocalizedString &a, int fieldWidth=0, QChar fillChar=QLatin1Char(' ')) const
QString join(const QString &separator) const const
void setText(const QString &text, QClipboard::Mode mode)
bool isValid() const const
VehicleSection::Type type(QStringView coachNumber, QStringView coachClassification)
QByteArray readAllStandardError()
QString text() const const
QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
void close()
KIOFILEWIDGETS_EXPORT QString dir(const QString &fileClass)
void rejected()
const char * constData() const const
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
QString fromLatin1(const char *str, int size)
virtual QVariant data(int role) const const
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString toString(Qt::DateFormat format) const const
static AgentManager * self()
Returns the global instance of the agent manager.
Definition: core/agentmanager.cpp:355
QStringList toStringList() const const
virtual void setData(const QVariant &value, int role)
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
QSqlError lastError() const const
void hideIntroduction()
Hides the label with the introduction message.
Success
QMessageBox::StandardButton critical(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton)
QStringList drivers()
QString toString() const const
AgentType::List types() const
Returns the list of all available agent types.
Definition: core/agentmanager.cpp:364
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jun 30 2022 03:51:46 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jun 30 2022 03:51:46 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.