Gui: show cpu architecture in version info instead of word size
Fix #15833
This commit is contained in:
committed by
Chris Hennes
parent
e30a42b647
commit
7f10bef82b
@@ -45,7 +45,7 @@
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>430</width>
|
||||
<height>17</height>
|
||||
@@ -74,7 +74,7 @@
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>31</width>
|
||||
<height>20</height>
|
||||
@@ -97,7 +97,7 @@
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>31</width>
|
||||
<height>20</height>
|
||||
@@ -172,14 +172,14 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="labelPlatform">
|
||||
<widget class="QLabel" name="labelArchitecture">
|
||||
<property name="text">
|
||||
<string>Word size</string>
|
||||
<string>Architecture</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="labelBuildPlatform">
|
||||
<widget class="QLabel" name="labelBuildRunArchitecture">
|
||||
<property name="text">
|
||||
<string notr="true"><html><head/><body><p><span style="font-weight:600;">Unknown</span></p></body></html></string>
|
||||
</property>
|
||||
@@ -231,7 +231,7 @@
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@@ -246,7 +246,7 @@
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>430</width>
|
||||
<height>17</height>
|
||||
@@ -371,7 +371,7 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>160</width>
|
||||
<height>31</height>
|
||||
|
||||
@@ -410,10 +410,17 @@ void AboutDialog::setupLabels()
|
||||
os.replace(QString::fromLatin1("Unknown"), prettyProductInfoWrapper());
|
||||
ui->labelBuildOS->setText(os);
|
||||
|
||||
QString platform = ui->labelBuildPlatform->text();
|
||||
platform.replace(QString::fromLatin1("Unknown"),
|
||||
QString::fromLatin1("%1-bit").arg(QSysInfo::WordSize));
|
||||
ui->labelBuildPlatform->setText(platform);
|
||||
QString architecture = ui->labelBuildRunArchitecture->text();
|
||||
if (QSysInfo::buildCpuArchitecture() == QSysInfo::currentCpuArchitecture()) {
|
||||
architecture.replace(QString::fromLatin1("Unknown"), QSysInfo::buildCpuArchitecture());
|
||||
}
|
||||
else {
|
||||
architecture.replace(
|
||||
QString::fromLatin1("Unknown"),
|
||||
QString::fromLatin1("%1 (running on: %2)")
|
||||
.arg(QSysInfo::buildCpuArchitecture(), QSysInfo::currentCpuArchitecture()));
|
||||
}
|
||||
ui->labelBuildRunArchitecture->setText(architecture);
|
||||
|
||||
// branch name
|
||||
it = config.find("BuildRevisionBranch");
|
||||
@@ -665,7 +672,11 @@ void AboutDialog::copyToClipboard()
|
||||
}
|
||||
|
||||
str << "OS: " << prettyProductInfoWrapper() << deskInfo << '\n';
|
||||
str << "Word size of " << exe << ": " << QSysInfo::WordSize << "-bit\n";
|
||||
if (QSysInfo::buildCpuArchitecture() == QSysInfo::currentCpuArchitecture()){
|
||||
str << "Architecture: " << QSysInfo::buildCpuArchitecture() << "\n";
|
||||
} else {
|
||||
str << "Architecture: " << QSysInfo::buildCpuArchitecture() << "(running on: " << QSysInfo::currentCpuArchitecture() << ")\n";
|
||||
}
|
||||
str << "Version: " << major << "." << minor << "." << point << suffix << "." << build;
|
||||
char *appimage = getenv("APPIMAGE");
|
||||
if (appimage)
|
||||
|
||||
Reference in New Issue
Block a user