# HG changeset patch # User Teemu Piippo # Date 1378648411 -10800 # Node ID 99225eac33baf967911e0330e5ac5cc59a0a482b # Parent a5457405cc9b86cfedb0a4686e5e8cc609a5072c use proper names QVariant and QChar instead of ambigous/dumb "var" and "qchar" diff -r a5457405cc9b -r 99225eac33ba src/config.cpp --- a/src/config.cpp Sun Sep 08 16:14:58 2013 +0300 +++ b/src/config.cpp Sun Sep 08 16:53:31 2013 +0300 @@ -84,10 +84,10 @@ m_releaseLayout = new QFormLayout (ui->zandronumVersions); m_testLayout = new QFormLayout (ui->betaVersions); - for (const var& ver : cfg::devBuildNames) + for (const QVariant& ver : cfg::devBuildNames) addVersion (ver.toString(), false); - for (const var& rel : cfg::releaseNames) + for (const QVariant& rel : cfg::releaseNames) addVersion (rel.toString(), true); } @@ -118,12 +118,12 @@ void ConfigBox::initFromSettings() { ui->wad_pathsList->clear(); - for (const var& it : cfg::wadpaths) + for (const QVariant& it : cfg::wadpaths) addPath (it.toString()); int i = 0; - for (const var& ver : getVersions()) + for (const QVariant& ver : getVersions()) m_zanBinaries[i++]->setText (cfg::binaryPaths[ver.toString()].toString()); ui->noDemoPrompt->setChecked (cfg::noprompt); @@ -141,7 +141,7 @@ cfg::noprompt = ui->noDemoPrompt->isChecked(); int i = 0; - for (const var& ver : getVersions()) + for (const QVariant& ver : getVersions()) cfg::binaryPaths[ver.toString()] = m_zanBinaries[i++]->text(); cfg::save(); diff -r a5457405cc9b -r 99225eac33ba src/demo.cpp --- a/src/demo.cpp Sun Sep 08 16:14:58 2013 +0300 +++ b/src/demo.cpp Sun Sep 08 16:53:31 2013 +0300 @@ -37,7 +37,7 @@ str out; int skip = 0; - for (const qchar& c : in) { + for (const QChar& c : in) { if (skip-- > 0) continue; @@ -67,7 +67,7 @@ // ============================================================================= // ----------------------------------------------------------------------------- static bool isKnownVersion (str ver) { - for (const var& it : getVersions()) + for (const QVariant& it : getVersions()) if (it.toString() == ver || it.toString() + 'M' == ver) return true; @@ -85,7 +85,7 @@ exit (9); } - for (const var& it : cfg::wadpaths) { + for (const QVariant& it : cfg::wadpaths) { str fullpath = fmt ("%1/%2", it.toString(), name); QFile f (fullpath); diff -r a5457405cc9b -r 99225eac33ba src/misc.cpp --- a/src/misc.cpp Sun Sep 08 16:14:58 2013 +0300 +++ b/src/misc.cpp Sun Sep 08 16:53:31 2013 +0300 @@ -44,9 +44,9 @@ cfg::binaryPaths[name] = binaryPath; if (isRelease) - cfg::releaseNames << var (name); + cfg::releaseNames << QVariant (name); else - cfg::devBuildNames << var (name); + cfg::devBuildNames << QVariant (name); cfg::save(); } diff -r a5457405cc9b -r 99225eac33ba src/types.cpp --- a/src/types.cpp Sun Sep 08 16:14:58 2013 +0300 +++ b/src/types.cpp Sun Sep 08 16:53:31 2013 +0300 @@ -40,7 +40,7 @@ StringFormatArg::StringFormatArg (const str& v) { m_val = v; } StringFormatArg::StringFormatArg (const char& v) { m_val = v; } StringFormatArg::StringFormatArg (const uchar& v) { m_val = v; } -StringFormatArg::StringFormatArg (const qchar& v) { m_val = v; } +StringFormatArg::StringFormatArg (const QChar& v) { m_val = v; } StringFormatArg::StringFormatArg (const float& v) { m_val = str::number (v); } StringFormatArg::StringFormatArg (const double& v) { m_val = str::number (v); } StringFormatArg::StringFormatArg (const char* v) { m_val = v; } diff -r a5457405cc9b -r 99225eac33ba src/types.h --- a/src/types.h Sun Sep 08 16:14:58 2013 +0300 +++ b/src/types.h Sun Sep 08 16:53:31 2013 +0300 @@ -25,8 +25,6 @@ #include typedef QString str; -typedef QChar qchar; -typedef QVariant var; template using list = QList; typedef unsigned int uint; typedef unsigned short ushort; @@ -60,7 +58,7 @@ StringFormatArg (const str& v); StringFormatArg (const char& v); StringFormatArg (const uchar& v); - StringFormatArg (const qchar& v); + StringFormatArg (const QChar& v); #define NUMERIC_FORMAT_ARG(T,C) \ StringFormatArg (const T& v) { \