From: APTX Date: Mon, 31 Aug 2015 17:50:11 +0000 (+0200) Subject: Fix version dialog. X-Git-Url: https://gitweb.tyo.aptx.org/?a=commitdiff_plain;h=e1ae00906511450186726aea5b03ff3107737bbb;p=localmylist.git Fix version dialog. --- diff --git a/localmylist-management/localmylist-management.pro b/localmylist-management/localmylist-management.pro index 70d3b65..112f119 100644 --- a/localmylist-management/localmylist-management.pro +++ b/localmylist-management/localmylist-management.pro @@ -81,6 +81,8 @@ FORMS += mainwindow.ui \ tabs/pathmappingtab.ui \ tabs/hosttab.ui +RESOURCES += resources.qrc + include(../localmylist.pri) include(qtsingleapplication/qtsingleapplication.pri) diff --git a/localmylist-management/main.cpp b/localmylist-management/main.cpp index 05ad5c9..15b7eee 100644 --- a/localmylist-management/main.cpp +++ b/localmylist-management/main.cpp @@ -5,6 +5,7 @@ int main(int argc, char *argv[]) { QtSingleApplication a(argc, argv); + a.setOrganizationName(LocalMyList::MyList::organizationName); if (a.isRunning()) { diff --git a/localmylist-management/resources.qrc b/localmylist-management/resources.qrc new file mode 100644 index 0000000..9b67871 --- /dev/null +++ b/localmylist-management/resources.qrc @@ -0,0 +1,5 @@ + + + share/icons/localmylist-management_128.png + + diff --git a/localmylist-management/versiondialog.cpp b/localmylist-management/versiondialog.cpp index 3151a81..e7ed57a 100644 --- a/localmylist-management/versiondialog.cpp +++ b/localmylist-management/versiondialog.cpp @@ -21,26 +21,30 @@ VersionDialog::VersionDialog(QWidget *parent) : QDialog(parent) if (LocalMyList::MyList::revision()) revision = tr("from revision %1").arg(LocalMyList::MyList::revision()); - const QString description = tr( - "

%1 %2 (%7 bit)

" - "

Built with\tQt %3
" - "Running with\tQt %4
" - "
" - "Built on " __DATE__ " at " __TIME__ " " - "%6" - "
" - "
" - "Copyright (C) 2009 %5. All rights reserved.

" - "

The program is provided AS IS with NO WARRANTY OF ANY KIND, " - "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A " - "PARTICULAR PURPOSE.

") + const QString description = tr(R"( +

%1 %2 (%7 bit)

+

Built with Qt %3
+ Running with Qt %4
+
+ Built on %8 at %9 + %6 +
+
+ Copyright (C) %10 %5. All rights reserved.

+

The program is provided AS IS with NO WARRANTY OF ANY KIND, + INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE.

)") .arg(qApp->applicationName()) .arg(qApp->applicationVersion()) .arg(QLatin1String(QT_VERSION_STR)) .arg(QLatin1String(qVersion())) .arg(qApp->organizationName()) .arg(revision) - .arg(QSysInfo::WordSize); + .arg(QSysInfo::WordSize) + .arg(__DATE__) + .arg(__TIME__) + // Format of __DATE__ is "Mmm dd yyyy" 16.8p1 [cpp.predefined] + .arg(__DATE__ + 7); QLabel *copyrightLabel = new QLabel(description); copyrightLabel->setWordWrap(true); @@ -53,6 +57,10 @@ VersionDialog::VersionDialog(QWidget *parent) : QDialog(parent) buttonBox->addButton(closeButton, QDialogButtonBox::ButtonRole(QDialogButtonBox::RejectRole | QDialogButtonBox::AcceptRole)); connect(buttonBox , SIGNAL(rejected()), this, SLOT(reject())); + QLabel *icon = new QLabel(this); + icon->setPixmap(QPixmap::fromImage(QImage(":/icon.png"))); + + layout->addWidget(icon, 0, 0); layout->addWidget(copyrightLabel, 0, 1, 4, 4); layout->addWidget(buttonBox, 4, 0, 1, 5); }