Make detailed version information available to command line (#257)
- Moved detailed version information from ReportBugDialog to Version::details() - Added QPA Platform information to verbose version information - Added Qt version to detailed version information - Added `-V` command line option to glabels-qt and glabels-batch-qt
This commit is contained in:
@@ -23,9 +23,6 @@
|
||||
#include "model/Version.h"
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QGuiApplication>
|
||||
#include <QLocale>
|
||||
#include <QSysInfo>
|
||||
#include <QUrl>
|
||||
#include <QtDebug>
|
||||
|
||||
@@ -58,19 +55,7 @@ namespace glabels
|
||||
|
||||
p2Label->setText( QString( "<p>%1</p>" ).arg( directionsP2 ) );
|
||||
|
||||
infoText->append( "> GLABELS" );
|
||||
infoText->append( "> Version: " + model::Version::STRING );
|
||||
infoText->append( "> " );
|
||||
|
||||
infoText->append( "> SYSTEM INFO" );
|
||||
infoText->append( "> OS: " + QSysInfo::prettyProductName() );
|
||||
infoText->append( "> Kernel: " + QSysInfo::kernelType() + " " + QSysInfo::kernelVersion() );
|
||||
infoText->append( "> Build CPU Architecture: " + QSysInfo::buildCpuArchitecture() );
|
||||
infoText->append( "> Current CPU Architecture: " + QSysInfo::currentCpuArchitecture() );
|
||||
infoText->append( "> " );
|
||||
|
||||
infoText->append( "> LOCALE" );
|
||||
infoText->append( "> Name: " + QLocale::system().name() );
|
||||
infoText->append( model::Version::details() );
|
||||
|
||||
QString directionsP3 =
|
||||
tr( "Be sure to include a detailed description of the problem and how to "
|
||||
|
||||
+10
-1
@@ -31,11 +31,11 @@
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCommandLineParser>
|
||||
#include <QDebug>
|
||||
#include <QIcon>
|
||||
#include <QLibraryInfo>
|
||||
#include <QLocale>
|
||||
#include <QTranslator>
|
||||
#include <QtDebug>
|
||||
|
||||
|
||||
int main( int argc, char **argv )
|
||||
@@ -82,10 +82,19 @@ int main( int argc, char **argv )
|
||||
parser.setApplicationDescription( QCoreApplication::translate( "main", "gLabels Label Designer" ) );
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
parser.addOption( { { "V", "Version" }, QCoreApplication::translate( "main", "More detailed version information." ) } );
|
||||
parser.addPositionalArgument( "files",
|
||||
QCoreApplication::translate( "main", "gLabels project files to open, optionally." ),
|
||||
"[files...]" );
|
||||
parser.process( app );
|
||||
|
||||
// Handle verbose version option
|
||||
if ( parser.isSet( "Version" ) )
|
||||
{
|
||||
qInfo().noquote() << glabels::model::Version::details();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Initialize subsystems
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>586</width>
|
||||
<height>675</height>
|
||||
<height>730</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -119,7 +119,7 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>250</height>
|
||||
<height>290</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="acceptRichText">
|
||||
@@ -151,7 +151,8 @@
|
||||
<string>Copy</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="glabels-edit-copy"/>
|
||||
<iconset theme="glabels-edit-copy">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
@@ -200,7 +201,7 @@
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>118</height>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
||||
Reference in New Issue
Block a user