mirror of
https://github.com/epasveer/seer.git
synced 2026-08-30 09:00:42 +08:00
Add a global version number.
So the main() and About dialog can use it.
This commit is contained in:
@@ -7,3 +7,17 @@
|
||||
% git merge better_refresh # Merge a branch back with the mainline.
|
||||
|
||||
|
||||
Git token refreshing.
|
||||
|
||||
erniep@gracie:/peak/src/seer$ gh auth login
|
||||
? What account do you want to log into? GitHub.com
|
||||
? What is your preferred protocol for Git operations? HTTPS
|
||||
? How would you like to authenticate GitHub CLI? Paste an authentication token
|
||||
Tip: you can generate a Personal Access Token here https://github.com/settings/tokens
|
||||
The minimum required scopes are 'repo', 'read:org', 'workflow'.
|
||||
? Paste your authentication token: ****************************************
|
||||
- gh config set -h github.com git_protocol https
|
||||
✓ Configured git protocol
|
||||
✓ Logged in as epasveer
|
||||
erniep@gracie:/peak/src/seer$
|
||||
|
||||
|
||||
+11
-2
@@ -1,4 +1,5 @@
|
||||
#include "SeerAboutDialog.h"
|
||||
#include "SeerUtl.h"
|
||||
#include <QtGui/QColor>
|
||||
#include <QtGui/QPalette>
|
||||
|
||||
@@ -8,14 +9,22 @@ SeerAboutDialog::SeerAboutDialog (QWidget* parent) : QDialog(parent) {
|
||||
setupUi(this);
|
||||
|
||||
// Setup the widgets
|
||||
|
||||
// Add the Version number to the end of the About text.
|
||||
// Scroll back to the top.
|
||||
textEdit->moveCursor (QTextCursor::End);
|
||||
textEdit->insertPlainText ("\n");
|
||||
textEdit->insertPlainText ("\n");
|
||||
textEdit->insertPlainText ("Version: " + Seer::version());
|
||||
textEdit->insertPlainText ("\n");
|
||||
textEdit->moveCursor (QTextCursor::Start);
|
||||
|
||||
// Set the TextEdit's background to the same as the window's.
|
||||
QColor windowColor = palette().color(QWidget::backgroundRole());
|
||||
|
||||
QPalette p = textEdit->palette();
|
||||
p.setColor(QPalette::Base, windowColor);
|
||||
textEdit->setPalette(p);
|
||||
|
||||
// Connect things.
|
||||
}
|
||||
|
||||
SeerAboutDialog::~SeerAboutDialog () {
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
|
||||
namespace Seer {
|
||||
|
||||
QString version () {
|
||||
|
||||
// Increment this with every release on GitHub.
|
||||
return "1.0.5";
|
||||
}
|
||||
|
||||
QString filterEscapes (const QString& str) {
|
||||
|
||||
QString tmp = str;
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
namespace Seer {
|
||||
|
||||
QString version ();
|
||||
|
||||
QString filterEscapes (const QString& str);
|
||||
QStringList parse (const QString& str, const QString& search, QChar startBracket, QChar endBracket, bool includeSearch);
|
||||
QString parseFirst (const QString& str, const QString& search, QChar startBracket, QChar endBracket, bool includeSearch);
|
||||
|
||||
+2
-2
@@ -1,4 +1,5 @@
|
||||
#include "SeerMainWindow.h"
|
||||
#include "SeerUtl.h"
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtGui/QIcon>
|
||||
#include <QtCore/QCommandLineParser>
|
||||
@@ -11,9 +12,8 @@ int main (int argc, char* argv[]) {
|
||||
QApplication app(argc, argv);
|
||||
|
||||
QCoreApplication::setApplicationName("Seer");
|
||||
QCoreApplication::setOrganizationName("Pasvix");
|
||||
QCoreApplication::setOrganizationName("pasvix.com");
|
||||
QCoreApplication::setApplicationVersion("1.0.5 - Ernie Pasveer (c)2021");
|
||||
QCoreApplication::setApplicationVersion(Seer::version() + " - Ernie Pasveer (c)2021");
|
||||
|
||||
//
|
||||
// Parse arguments.
|
||||
|
||||
Reference in New Issue
Block a user