Adapt to c++utilities API changes

This commit is contained in:
Martchus 2019-05-04 22:18:31 +02:00
parent a30853cfeb
commit 0049d96bca
4 changed files with 7 additions and 9 deletions

View File

@ -2,7 +2,6 @@
#include <c++utilities/conversion/stringbuilder.h>
#include <c++utilities/io/ansiescapecodes.h>
#include <c++utilities/io/catchiofailure.h>
#include <c++utilities/io/misc.h>
#include <c++utilities/tests/testutils.h>
@ -38,9 +37,8 @@ string readMockFile(const string &filePath)
{
try {
return readFile(filePath);
} catch (...) {
const char *const what = catchIoFailure();
cerr << Phrases::Error << "An IO error occured when reading mock config file \"" << filePath << "\": " << what << Phrases::EndFlush;
} catch (const std::ios_base::failure &failure) {
cerr << Phrases::Error << "An IO error occured when reading mock config file \"" << filePath << "\": " << failure.what() << Phrases::EndFlush;
exit(-2);
}
}

View File

@ -93,9 +93,9 @@ void SyncthingFileItemActionStaticData::rescanDir(const QString &dirId, const QS
void SyncthingFileItemActionStaticData::showAboutDialog()
{
auto *aboutDialog = new AboutDialog(nullptr, QStringLiteral(APP_NAME), QStringLiteral(APP_AUTHOR "\nSyncthing icons from Syncthing project"),
QStringLiteral(APP_VERSION), ApplicationUtilities::dependencyVersions2, QStringLiteral(APP_URL), QStringLiteral(APP_DESCRIPTION),
QImage(statusIcons().scanninig.pixmap(128).toImage()));
auto *const aboutDialog = new AboutDialog(nullptr, QStringLiteral(APP_NAME),
QStringLiteral(APP_AUTHOR "\nSyncthing icons from Syncthing project"), QStringLiteral(APP_VERSION), ApplicationUtilities::dependencyVersions,
QStringLiteral(APP_URL), QStringLiteral(APP_DESCRIPTION), QImage(statusIcons().scanninig.pixmap(128).toImage()));
aboutDialog->setWindowTitle(tr("About") + QStringLiteral(" - " APP_NAME));
aboutDialog->setWindowIcon(QIcon::fromTheme(QStringLiteral("syncthingtray")));
aboutDialog->setAttribute(Qt::WA_DeleteOnClose);

View File

@ -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 "
"icons from <a href=\"https://fontawesome.com\">Font "
"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()));
m_aboutDlg->setWindowTitle(tr("About") + QStringLiteral(" - " APP_NAME));
m_aboutDlg->setWindowIcon(QIcon::fromTheme(QStringLiteral("syncthingtray")));

View File

@ -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 "
"icons from <a href=\"https://fontawesome.com\">Font "
"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")));
m_aboutDlg->setWindowTitle(tr("About") + QStringLiteral(" - " APP_NAME));
m_aboutDlg->setWindowIcon(QIcon(QStringLiteral(":/icons/hicolor/scalable/app/syncthingtray.svg")));