qmc2: update to 0.192
This commit is contained in:
parent
aea1acb8cf
commit
5d02caef3d
2 changed files with 2 additions and 112 deletions
|
@ -1,110 +0,0 @@
|
|||
--- emuopt.cpp 2017-02-12 13:23:51.059819191 +0100
|
||||
+++ emuopt.cpp 2017-03-07 01:57:07.400869534 +0100
|
||||
@@ -53,6 +53,13 @@
|
||||
QStringList optionChoices;
|
||||
QString optionPart;
|
||||
QString optionRelativeTo;
|
||||
+// String literals for QString::compare()
|
||||
+static const QString s_true = QStringLiteral("true");
|
||||
+static const QString s_false = QStringLiteral("false");
|
||||
+static const QString s_combo = QStringLiteral("combo");
|
||||
+static const QString s_choice = QStringLiteral("choice");
|
||||
+static const QString s_file = QStringLiteral("file");
|
||||
+static const QString s_emulatorWorkingDirectory = QStringLiteral("emulatorWorkingDirectory");
|
||||
|
||||
#if defined(_MIN)
|
||||
#undef _MIN
|
||||
@@ -514,7 +521,7 @@
|
||||
optionType = subItem->text(1);
|
||||
}
|
||||
if ( optionType == "bool" )
|
||||
- defaultValue = defaultValue == tr("true") ? "true" : "false";
|
||||
+ defaultValue = defaultValue == tr("true") ? s_true : s_false;
|
||||
if ( qmc2Config->group() == settingsGroup ) {
|
||||
qmc2Config->endGroup();
|
||||
if ( qmc2Config->contains(QMC2_EMULATOR_PREFIX + "Configuration/Global/" + optionName) )
|
||||
@@ -543,9 +550,9 @@
|
||||
case QMC2_EMUOPT_TYPE_BOOL: {
|
||||
QCheckBox *checkBoxEditor = static_cast<QCheckBox*>(editor);
|
||||
if ( checkBoxEditor->isChecked() )
|
||||
- currentValue = "true";
|
||||
+ currentValue = s_true;
|
||||
else
|
||||
- currentValue = "false";
|
||||
+ currentValue = s_false;
|
||||
break;
|
||||
}
|
||||
case QMC2_EMUOPT_TYPE_INT: {
|
||||
@@ -1201,7 +1208,7 @@
|
||||
if ( xmlReader->isStartElement() ) {
|
||||
QString elementType(xmlReader->name().toString());
|
||||
if ( choiceEntity.compare(elementType) == 0 ) {
|
||||
- if ( xmlReader->attributes().value("ignore").compare("true") != 0 && xmlReader->attributes().value(ignoreOS).compare("true") != 0 )
|
||||
+ if ( xmlReader->attributes().value("ignore").compare(s_true) != 0 && xmlReader->attributes().value(ignoreOS).compare(s_true) != 0 )
|
||||
validChoices.append(xmlReader->attributes().value("name").toString());
|
||||
} else
|
||||
readNext = false;
|
||||
@@ -1257,9 +1264,9 @@
|
||||
if ( sectionEntity.compare(elementType) == 0 ) {
|
||||
bool ignore = false;
|
||||
if ( xmlReader.attributes().hasAttribute("ignore") )
|
||||
- ignore = xmlReader.attributes().value("ignore").compare("true") == 0;
|
||||
+ ignore = xmlReader.attributes().value("ignore").compare(s_true) == 0;
|
||||
if ( xmlReader.attributes().hasAttribute(ignoreOS) )
|
||||
- ignore |= xmlReader.attributes().value(ignoreOS).compare("true") == 0;
|
||||
+ ignore |= xmlReader.attributes().value(ignoreOS).compare(s_true) == 0;
|
||||
if ( !ignore ) {
|
||||
sectionTitle = readDescription(&xmlReader, lang, &readNext);
|
||||
templateMap[sectionTitle].clear();
|
||||
@@ -1274,17 +1274,17 @@
|
||||
if ( optionEntity.compare(elementType) == 0 ) {
|
||||
bool ignore = false;
|
||||
if ( xmlReader.attributes().hasAttribute("ignore") )
|
||||
- ignore = xmlReader.attributes().value("ignore").compare("true") == 0;
|
||||
+ ignore = xmlReader.attributes().value("ignore").compare(s_true) == 0;
|
||||
if ( xmlReader.attributes().hasAttribute(ignoreOS) )
|
||||
- ignore |= xmlReader.attributes().value(ignoreOS).compare("true") == 0;
|
||||
+ ignore |= xmlReader.attributes().value(ignoreOS).compare(s_true) == 0;
|
||||
if ( !ignore ) {
|
||||
bool visible = true;
|
||||
bool wip = false;
|
||||
int decimals = QMC2_EMUOPT_DFLT_DECIMALS;
|
||||
if ( xmlReader.attributes().hasAttribute("wip") )
|
||||
- wip = xmlReader.attributes().value("wip").compare("true") == 0;
|
||||
+ wip = xmlReader.attributes().value("wip").compare(s_true) == 0;
|
||||
if ( xmlReader.attributes().hasAttribute("visible") )
|
||||
- visible = xmlReader.attributes().value("visible").compare("true") == 0;
|
||||
+ visible = xmlReader.attributes().value("visible").compare(s_true) == 0;
|
||||
if ( xmlReader.attributes().hasAttribute("decimals") )
|
||||
decimals = xmlReader.attributes().value("decimals").toString().toInt();
|
||||
QString type(xmlReader.attributes().value("type").toString());
|
||||
@@ -1290,17 +1297,17 @@
|
||||
defaultValue = xmlReader.attributes().value("default").toString();
|
||||
QString optionDescription(readDescription(&xmlReader, lang, &readNext));
|
||||
optionChoices.clear();
|
||||
- if ( type.compare("combo") == 0 && xmlReader.name().compare("choice") == 0 )
|
||||
+ if ( type.compare(s_combo) == 0 && xmlReader.name().compare(s_choice) == 0 )
|
||||
optionChoices = readChoices(&xmlReader);
|
||||
optionPart.clear();
|
||||
optionRelativeTo.clear();
|
||||
- if ( type.compare("file") == 0 ) {
|
||||
+ if ( type.compare(s_file) == 0 ) {
|
||||
if ( xmlReader.attributes().hasAttribute("part") )
|
||||
optionPart = xmlReader.attributes().value("part").toString();
|
||||
if ( xmlReader.attributes().hasAttribute("relativeTo") )
|
||||
optionRelativeTo = xmlReader.attributes().value("relativeTo").toString();
|
||||
if ( !optionRelativeTo.isEmpty() ) {
|
||||
- if ( optionRelativeTo.compare("emulatorWorkingDirectory") == 0 )
|
||||
+ if ( optionRelativeTo.compare(s_emulatorWorkingDirectory) == 0 )
|
||||
optionDescription.append(" (" + tr("relative to the emulator's working directory") + ")");
|
||||
else
|
||||
optionDescription.append(" (" + tr("relative to the path specified in '%1'").arg(optionRelativeTo) + ")");
|
||||
@@ -1507,7 +1514,7 @@
|
||||
break;
|
||||
case QMC2_EMUOPT_TYPE_BOOL: {
|
||||
assumedType = "bool";
|
||||
- QString emuOpt(emuOptions[option.name] == "0" ? "false" : (emuOptions[option.name] == "1" ? "true" : emuOptions[option.name]));
|
||||
+ QString emuOpt(emuOptions[option.name] == "0" ? s_false : (emuOptions[option.name] == "1" ? s_true : emuOptions[option.name]));
|
||||
if ( option.dvalue != emuOpt ) {
|
||||
diffCount++;
|
||||
if ( qmc2TemplateCheck ) {
|
|
@ -1,6 +1,6 @@
|
|||
# Template file for 'qmc2'
|
||||
pkgname=qmc2
|
||||
version=0.187
|
||||
version=0.192
|
||||
revision=1
|
||||
wrksrc=${pkgname}
|
||||
build_style=gnu-makefile
|
||||
|
@ -16,7 +16,7 @@ maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
|
|||
license="GPL-2"
|
||||
homepage="http://qmc2.arcadehits.net/wordpress/"
|
||||
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}/${version}/${pkgname}-${version}.tar.bz2"
|
||||
checksum=8db7e4e8fb22b40c65869e70f8517c6897e20bcf2c78026b09a443a8c4459092
|
||||
checksum=63f89a6839121fef5d5381f7b0baae8ca5e401bf5f32f7d36b36c357e85cee87
|
||||
|
||||
if [ -n "$CROSS_BUILD" ]; then
|
||||
hostmakedepends+=" qt5-host-tools qt5-multimedia-devel qt5-script-devel qt5-svg-devel"
|
||||
|
|
Loading…
Reference in a new issue