AboutDialog: Updated copyright year so we don't have to manually tweak it. Thank you Z3 library.

This commit is contained in:
Daniel Marjamäki 2020-06-14 07:35:37 +02:00
parent 97fd51edd1
commit 0f28e7b88e
2 changed files with 7 additions and 4 deletions

View File

@ -78,7 +78,7 @@
<item> <item>
<widget class="QLabel" name="mCopyright"> <widget class="QLabel" name="mCopyright">
<property name="text"> <property name="text">
<string>Copyright © 2007-2019 Cppcheck team.</string> <string>Copyright © 2007-%1 Cppcheck team.</string>
</property> </property>
<property name="wordWrap"> <property name="wordWrap">
<bool>true</bool> <bool>true</bool>
@ -114,10 +114,11 @@ of the GNU General Public License version 3</string>
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt; <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
&lt;p&gt;Many thanks to these libraries that we use:&lt;/p&gt;&lt;ul&gt; &lt;p&gt;Many thanks to these libraries that we use:&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;tinyxml2&lt;/li&gt;
&lt;li&gt;picojson&lt;/li&gt;
&lt;li&gt;pcre&lt;/li&gt; &lt;li&gt;pcre&lt;/li&gt;
&lt;li&gt;qt&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;li&gt;picojson&lt;/li&gt;
&lt;li&gt;qt&lt;/li&gt;
&lt;li&gt;tinyxml2&lt;/li&gt;
&lt;li&gt;z3&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -31,6 +31,8 @@ AboutDialog::AboutDialog(const QString &version, const QString &extraVersion, QW
fmtVersion += " (" + extraVersion + ")"; fmtVersion += " (" + extraVersion + ")";
} }
mUI.mVersion->setText(mUI.mVersion->text().arg(fmtVersion)); mUI.mVersion->setText(mUI.mVersion->text().arg(fmtVersion));
QString date = __DATE__;
mUI.mCopyright->setText(mUI.mCopyright->text().arg(date.right(4)));
QString url = "<a href=\"http://cppcheck.net/\">http://cppcheck.net/</a>"; QString url = "<a href=\"http://cppcheck.net/\">http://cppcheck.net/</a>";
mUI.mHomepage->setText(mUI.mHomepage->text().arg(url)); mUI.mHomepage->setText(mUI.mHomepage->text().arg(url));
connect(mUI.mButtons, &QDialogButtonBox::accepted, this, &AboutDialog::accept); connect(mUI.mButtons, &QDialogButtonBox::accepted, this, &AboutDialog::accept);