forked from qt-creator/qt-creator
compile everything with QT_USE_FAST_CONCATENATION
This commit is contained in:
@@ -90,8 +90,7 @@ LIBS += -L$$IDE_LIBRARY_PATH
|
|||||||
|
|
||||||
# DEFINES += QT_NO_CAST_FROM_ASCII
|
# DEFINES += QT_NO_CAST_FROM_ASCII
|
||||||
DEFINES += QT_NO_CAST_TO_ASCII
|
DEFINES += QT_NO_CAST_TO_ASCII
|
||||||
#DEFINES += QT_USE_FAST_OPERATOR_PLUS
|
DEFINES += QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION
|
||||||
#DEFINES += QT_USE_FAST_CONCATENATION
|
|
||||||
|
|
||||||
unix {
|
unix {
|
||||||
CONFIG(debug, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared
|
CONFIG(debug, debug|release):OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared
|
||||||
|
|||||||
@@ -79,18 +79,18 @@ QVariant RegisterHandler::data(const QModelIndex &index, int role) const
|
|||||||
// Return some address associated with the register.
|
// Return some address associated with the register.
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
qulonglong value = reg.value.toULongLong(&ok, 0);
|
qulonglong value = reg.value.toULongLong(&ok, 0);
|
||||||
return ok ? QString::fromLatin1("0x") + QString::number(value, 16) : QVariant();
|
return ok ? QVariant(QString::fromLatin1("0x") + QString::number(value, 16)) : QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString padding = " ";
|
const QString padding = " ";
|
||||||
if (role == Qt::DisplayRole) {
|
if (role == Qt::DisplayRole) {
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case 0: return padding + reg.name + padding;
|
case 0: return QVariant(padding + reg.name + padding);
|
||||||
case 1: {
|
case 1: {
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
qulonglong value = reg.value.toULongLong(&ok, 0);
|
qulonglong value = reg.value.toULongLong(&ok, 0);
|
||||||
QString res = ok ? QString::number(value, m_base) : reg.value;
|
QString res = ok ? QString::number(value, m_base) : reg.value;
|
||||||
return QString(m_strlen - res.size(), QLatin1Char(' ')) + res;
|
return QVariant(QString(m_strlen - res.size(), QLatin1Char(' ')) + res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -803,7 +803,7 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const
|
|||||||
switch (idx.column()) {
|
switch (idx.column()) {
|
||||||
case 0:
|
case 0:
|
||||||
if (data.name == QLatin1String("*") && item->parent)
|
if (data.name == QLatin1String("*") && item->parent)
|
||||||
return QLatin1Char('*') + item->parent->name;
|
return QVariant(QLatin1Char('*') + item->parent->name);
|
||||||
return data.name;
|
return data.name;
|
||||||
case 1: {
|
case 1: {
|
||||||
int format = m_handler->m_individualFormats.value(data.iname, -1);
|
int format = m_handler->m_individualFormats.value(data.iname, -1);
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
|
|||||||
|
|
||||||
// FIXME shouldn't the help engine create the directory if it doesn't exist?
|
// FIXME shouldn't the help engine create the directory if it doesn't exist?
|
||||||
const QFileInfo &fi(m_core->settings()->fileName());
|
const QFileInfo &fi(m_core->settings()->fileName());
|
||||||
const QDir &directory(fi.absolutePath()+"/qtcreator");
|
const QDir directory(fi.absolutePath() + QLatin1Literal("/qtcreator"));
|
||||||
if (!directory.exists())
|
if (!directory.exists())
|
||||||
directory.mkpath(directory.absolutePath());
|
directory.mkpath(directory.absolutePath());
|
||||||
m_helpEngine = new QHelpEngine(directory.absolutePath() +
|
m_helpEngine = new QHelpEngine(directory.absolutePath() +
|
||||||
@@ -976,8 +976,8 @@ void HelpPlugin::openHelpPage(const QString& url)
|
|||||||
} else {
|
} else {
|
||||||
urlPrefix = QLatin1String("http://doc.trolltech.com/latest/");
|
urlPrefix = QLatin1String("http://doc.trolltech.com/latest/");
|
||||||
}
|
}
|
||||||
QDesktopServices::openUrl(urlPrefix + url.mid(url
|
QDesktopServices::openUrl(QUrl(urlPrefix + url.mid(url
|
||||||
.lastIndexOf(QLatin1Char('/')) + 1));
|
.lastIndexOf(QLatin1Char('/')) + 1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -438,7 +438,8 @@ void MSVCToolChain::addToEnvironment(ProjectExplorer::Environment &env)
|
|||||||
return;
|
return;
|
||||||
QString filename = tf.fileName();
|
QString filename = tf.fileName();
|
||||||
tf.write("call \"" + varsbat.toLocal8Bit()+"\"\r\n");
|
tf.write("call \"" + varsbat.toLocal8Bit()+"\"\r\n");
|
||||||
tf.write(("set > \"" + QDir::tempPath() + "\\qtcreator-msvc-environment.txt\"\r\n").toLocal8Bit());
|
QString redirect = "set > \"" + QDir::tempPath() + "\\qtcreator-msvc-environment.txt\"\r\n";
|
||||||
|
tf.write(redirect.toLocal8Bit());
|
||||||
tf.flush();
|
tf.flush();
|
||||||
tf.waitForBytesWritten(30000);
|
tf.waitForBytesWritten(30000);
|
||||||
|
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ QList<Core::GeneratedFile> PluginGenerator::generatePlugin(const GenerationPara
|
|||||||
QLatin1String(", ") +
|
QLatin1String(", ") +
|
||||||
wo.pluginClassName +
|
wo.pluginClassName +
|
||||||
QLatin1Char(')') :
|
QLatin1Char(')') :
|
||||||
QLatin1String(""));
|
QString());
|
||||||
const QString pluginSourceContents = processTemplate(p.templatePath + QLatin1String("/tpl_single.cpp"), sm, errorMessage);
|
const QString pluginSourceContents = processTemplate(p.templatePath + QLatin1String("/tpl_single.cpp"), sm, errorMessage);
|
||||||
if (pluginSourceContents.isEmpty())
|
if (pluginSourceContents.isEmpty())
|
||||||
return QList<Core::GeneratedFile>();
|
return QList<Core::GeneratedFile>();
|
||||||
|
|||||||
@@ -800,8 +800,9 @@ QString BookmarkManager::uniqueFolderName() const
|
|||||||
foreach (const QStandardItem *item, list)
|
foreach (const QStandardItem *item, list)
|
||||||
names << item->text();
|
names << item->text();
|
||||||
|
|
||||||
|
QString folderNameBase = tr("New Folder") + QLatin1String(" %1");
|
||||||
for (int i = 1; i <= names.count(); ++i) {
|
for (int i = 1; i <= names.count(); ++i) {
|
||||||
folderName = (tr("New Folder") + QLatin1String(" %1")).arg(i);
|
folderName = folderNameBase.arg(i);
|
||||||
if (!names.contains(folderName))
|
if (!names.contains(folderName))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2875,7 +2875,7 @@ bool ProFileEvaluator::Private::evaluateFeatureFile(
|
|||||||
QString currFn = currentFileName();
|
QString currFn = currentFileName();
|
||||||
if (IoUtils::fileName(currFn) == IoUtils::fileName(fn)) {
|
if (IoUtils::fileName(currFn) == IoUtils::fileName(fn)) {
|
||||||
for (int root = 0; root < m_option->feature_roots.size(); ++root)
|
for (int root = 0; root < m_option->feature_roots.size(); ++root)
|
||||||
if (m_option->feature_roots.at(root) + fn == currFn) {
|
if (currFn == m_option->feature_roots.at(root) + fn) {
|
||||||
start_root = root + 1;
|
start_root = root + 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,3 +18,4 @@ SOURCES = main.cpp profileevaluator.cpp proitems.cpp ioutils.cpp
|
|||||||
HEADERS = profileevaluator.h proitems.h ioutils.h
|
HEADERS = profileevaluator.h proitems.h ioutils.h
|
||||||
|
|
||||||
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
|
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
|
||||||
|
DEFINES += QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION
|
||||||
|
|||||||
Reference in New Issue
Block a user