Adapt to c++utilities API changes
This commit is contained in:
parent
a30853cfeb
commit
0049d96bca
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
#include <c++utilities/conversion/stringbuilder.h>
|
#include <c++utilities/conversion/stringbuilder.h>
|
||||||
#include <c++utilities/io/ansiescapecodes.h>
|
#include <c++utilities/io/ansiescapecodes.h>
|
||||||
#include <c++utilities/io/catchiofailure.h>
|
|
||||||
#include <c++utilities/io/misc.h>
|
#include <c++utilities/io/misc.h>
|
||||||
#include <c++utilities/tests/testutils.h>
|
#include <c++utilities/tests/testutils.h>
|
||||||
|
|
||||||
|
@ -38,9 +37,8 @@ string readMockFile(const string &filePath)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return readFile(filePath);
|
return readFile(filePath);
|
||||||
} catch (...) {
|
} catch (const std::ios_base::failure &failure) {
|
||||||
const char *const what = catchIoFailure();
|
cerr << Phrases::Error << "An IO error occured when reading mock config file \"" << filePath << "\": " << failure.what() << Phrases::EndFlush;
|
||||||
cerr << Phrases::Error << "An IO error occured when reading mock config file \"" << filePath << "\": " << what << Phrases::EndFlush;
|
|
||||||
exit(-2);
|
exit(-2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,9 +93,9 @@ void SyncthingFileItemActionStaticData::rescanDir(const QString &dirId, const QS
|
||||||
|
|
||||||
void SyncthingFileItemActionStaticData::showAboutDialog()
|
void SyncthingFileItemActionStaticData::showAboutDialog()
|
||||||
{
|
{
|
||||||
auto *aboutDialog = new AboutDialog(nullptr, QStringLiteral(APP_NAME), QStringLiteral(APP_AUTHOR "\nSyncthing icons from Syncthing project"),
|
auto *const aboutDialog = new AboutDialog(nullptr, QStringLiteral(APP_NAME),
|
||||||
QStringLiteral(APP_VERSION), ApplicationUtilities::dependencyVersions2, QStringLiteral(APP_URL), QStringLiteral(APP_DESCRIPTION),
|
QStringLiteral(APP_AUTHOR "\nSyncthing icons from Syncthing project"), QStringLiteral(APP_VERSION), ApplicationUtilities::dependencyVersions,
|
||||||
QImage(statusIcons().scanninig.pixmap(128).toImage()));
|
QStringLiteral(APP_URL), QStringLiteral(APP_DESCRIPTION), QImage(statusIcons().scanninig.pixmap(128).toImage()));
|
||||||
aboutDialog->setWindowTitle(tr("About") + QStringLiteral(" - " APP_NAME));
|
aboutDialog->setWindowTitle(tr("About") + QStringLiteral(" - " APP_NAME));
|
||||||
aboutDialog->setWindowIcon(QIcon::fromTheme(QStringLiteral("syncthingtray")));
|
aboutDialog->setWindowIcon(QIcon::fromTheme(QStringLiteral("syncthingtray")));
|
||||||
aboutDialog->setAttribute(Qt::WA_DeleteOnClose);
|
aboutDialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
|
|
@ -312,7 +312,7 @@ void SyncthingApplet::showAboutDialog()
|
||||||
QStringLiteral("<p>Developed by " APP_AUTHOR "<br>Syncthing icons from <a href=\"https://syncthing.net\">Syncthing project</a><br>Using "
|
QStringLiteral("<p>Developed by " APP_AUTHOR "<br>Syncthing icons from <a href=\"https://syncthing.net\">Syncthing project</a><br>Using "
|
||||||
"icons from <a href=\"https://fontawesome.com\">Font "
|
"icons from <a href=\"https://fontawesome.com\">Font "
|
||||||
"Awesome</a> (see <a href=\"https://fontawesome.com/license\">their license</a>)</p>"),
|
"Awesome</a> (see <a href=\"https://fontawesome.com/license\">their license</a>)</p>"),
|
||||||
QStringLiteral(APP_VERSION), ApplicationUtilities::dependencyVersions2, QStringLiteral(APP_URL), QStringLiteral(APP_DESCRIPTION),
|
QStringLiteral(APP_VERSION), ApplicationUtilities::dependencyVersions, QStringLiteral(APP_URL), QStringLiteral(APP_DESCRIPTION),
|
||||||
QImage(statusIcons().scanninig.pixmap(128).toImage()));
|
QImage(statusIcons().scanninig.pixmap(128).toImage()));
|
||||||
m_aboutDlg->setWindowTitle(tr("About") + QStringLiteral(" - " APP_NAME));
|
m_aboutDlg->setWindowTitle(tr("About") + QStringLiteral(" - " APP_NAME));
|
||||||
m_aboutDlg->setWindowIcon(QIcon::fromTheme(QStringLiteral("syncthingtray")));
|
m_aboutDlg->setWindowIcon(QIcon::fromTheme(QStringLiteral("syncthingtray")));
|
||||||
|
|
|
@ -203,7 +203,7 @@ void TrayWidget::showAboutDialog()
|
||||||
"<br>Fallback icons from KDE/Breeze project<br>Syncthing icons from <a href=\"https://syncthing.net\">Syncthing project</a><br>Using "
|
"<br>Fallback icons from KDE/Breeze project<br>Syncthing icons from <a href=\"https://syncthing.net\">Syncthing project</a><br>Using "
|
||||||
"icons from <a href=\"https://fontawesome.com\">Font "
|
"icons from <a href=\"https://fontawesome.com\">Font "
|
||||||
"Awesome</a> (see <a href=\"https://fontawesome.com/license\">their license</a>)</p>"),
|
"Awesome</a> (see <a href=\"https://fontawesome.com/license\">their license</a>)</p>"),
|
||||||
QString(), ApplicationUtilities::dependencyVersions2, QString(), QStringLiteral(APP_DESCRIPTION),
|
QString(), ApplicationUtilities::dependencyVersions, QString(), QStringLiteral(APP_DESCRIPTION),
|
||||||
QImage(QStringLiteral(":/icons/hicolor/scalable/app/syncthingtray.svg")));
|
QImage(QStringLiteral(":/icons/hicolor/scalable/app/syncthingtray.svg")));
|
||||||
m_aboutDlg->setWindowTitle(tr("About") + QStringLiteral(" - " APP_NAME));
|
m_aboutDlg->setWindowTitle(tr("About") + QStringLiteral(" - " APP_NAME));
|
||||||
m_aboutDlg->setWindowIcon(QIcon(QStringLiteral(":/icons/hicolor/scalable/app/syncthingtray.svg")));
|
m_aboutDlg->setWindowIcon(QIcon(QStringLiteral(":/icons/hicolor/scalable/app/syncthingtray.svg")));
|
||||||
|
|
Loading…
Reference in New Issue