Skip to content

Commit

Permalink
Version 0.0.1
Browse files Browse the repository at this point in the history
Lets tag it.
  • Loading branch information
diegoiast committed Sep 24, 2024
1 parent 99eb549 commit 02267a8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ std::string getAppImagePath() {
}

int main(int argc, char *argv[]) {
QCoreApplication::setApplicationName("qtedit4");
QApplication app(argc, argv);

app.setApplicationVersion("0.0.1");
app.setApplicationName("qtedit4");
QCoreApplication::setApplicationName("qtedit4");
QCoreApplication::setApplicationVersion("0.0.1");

#if defined(WIN32)
// default style on windows is ugly and unusable.
Expand Down
23 changes: 21 additions & 2 deletions src/plugins/help/help_plg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#ifdef _WIN32
#include <windows.h>
#else
#include <QHBoxLayout>
#include <QLabel>
#include <unistd.h>
#endif

Expand Down Expand Up @@ -198,8 +200,25 @@ void HelpPlugin::showAbout() {
}

void HelpPlugin::actionAbout_triggered() {
QMessageBox::information(dynamic_cast<QMainWindow *>(mdiServer), "About",
"QtEdit4 - a text editor");
auto appName = QCoreApplication::applicationName();
auto version = QCoreApplication::applicationVersion();
auto aboutText = QString(tr("<h2>%1 %2</h2>"
"<p>A versatile text editor</p>"
"<p>Home page: <a "
"href='%3/'>%3"
"diegoiast/qtedit4/</a></p>"
"<p>Licensed under the GNU General Public License v3.0 (GPLv3)</p>"
"<p>Copyright © 2024 Diego Iastrubni</p>"))
.arg(appName, version, "https://github.com/diegoiast/qtedit4");

auto aboutBox = QMessageBox(getManager());
aboutBox.setWindowTitle(tr("About %1").arg(appName));
aboutBox.setText(aboutText);
aboutBox.setTextFormat(Qt::RichText);
aboutBox.setIconPixmap(QPixmap(":/icons/qtedit4.png")
.scaled(64, 64, Qt::KeepAspectRatio, Qt::SmoothTransformation));

aboutBox.exec();
}

void HelpPlugin::checkForUpdates_triggered() {
Expand Down

0 comments on commit 02267a8

Please sign in to comment.