Commit 55948453 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Utils: Compile with QT_NO_CAST_FROM_ASCII



Change-Id: Id600156bb3cef3aeea5d8b4d6bf879e77d755710
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
parent 2f862681
......@@ -120,14 +120,14 @@ bool ConsoleProcess::start(const QString &program, const QString &args)
ZeroMemory(d->m_pid, sizeof(PROCESS_INFORMATION));
QString workDir = QDir::toNativeSeparators(workingDirectory());
if (!workDir.isEmpty() && !workDir.endsWith('\\'))
workDir.append('\\');
if (!workDir.isEmpty() && !workDir.endsWith(QLatin1Char('\\')))
workDir.append(QLatin1Char('\\'));
QStringList stubArgs;
stubArgs << modeOption(d->m_mode)
<< d->m_stubServer.fullServerName()
<< workDir
<< (d->m_tempFile ? d->m_tempFile->fileName() : 0)
<< (d->m_tempFile ? d->m_tempFile->fileName() : QString())
<< createWinCommandline(pcmd, pargs)
<< msgPromptToClose();
......
......@@ -48,7 +48,7 @@ public:
lib.cd(QLatin1String("../lib"));
QString toReplace = lib.path();
lib.cd(QLatin1String("qtcreator"));
toReplace.append(QLatin1String(":"));
toReplace.append(QLatin1Char(':'));
toReplace.append(lib.path());
if (ldLibraryPath.startsWith(toReplace))
......
......@@ -153,8 +153,8 @@ QVariant EnvironmentModel::data(const QModelIndex &index, int role) const
if (role == Qt::ToolTipRole && value.length() > 80) {
// Use html to enable text wrapping
value = Qt::escape(value);
value.prepend("<html><body>");
value.append("</body></html>");
value.prepend(QLatin1String("<html><body>"));
value.append(QLatin1String("</body></html>"));
}
return value;
}
......
......@@ -169,7 +169,7 @@ void TcpPortsGathererPrivate::updateLinux(TcpPortsGatherer::ProtocolFlags protoc
));
while (!file.atEnd()) {
QByteArray line = file.readLine();
if (pattern.indexIn(line) != -1) {
if (pattern.indexIn(QLatin1String(line)) != -1) {
bool isNumber;
quint16 port = pattern.cap(1).toUShort(&isNumber, 16);
QTC_ASSERT(isNumber, continue);
......@@ -213,12 +213,12 @@ void TcpPortsGathererPrivate::updateNetstat(TcpPortsGatherer::ProtocolFlags prot
"\\s+\\d+" // whitespace, number (Recv-Q)
"\\s+\\d+" // whitespace, number (Send-Q)
"\\s+(\\S+)")); // whitespace, Local Address
if (pattern.indexIn(line) != -1) {
if (pattern.indexIn(QLatin1String(line)) != -1) {
QString localAddress = pattern.cap(1);
// Examples of local addresses:
// '*.56501' , '*.*' 'fe80::1%lo0.123'
int portDelimiterPos = localAddress.lastIndexOf(".");
int portDelimiterPos = localAddress.lastIndexOf(QLatin1Char('.'));
if (portDelimiterPos == -1)
continue;
......
......@@ -9,6 +9,8 @@ QT += script network
CONFIG += exceptions # used by portlist.cpp, textfileformat.cpp, and ssh/*
DEFINES += QT_NO_CAST_FROM_ASCII
win32-msvc* {
# disable warnings caused by botan headers
QMAKE_CXXFLAGS += -wd4250 -wd4290
......
......@@ -4,7 +4,7 @@ import "../QtcLibrary.qbs" as QtcLibrary
QtcLibrary {
name: "Utils"
cpp.defines: base.concat(["QTCREATOR_UTILS_LIB"])
cpp.defines: base.concat(["QTCREATOR_UTILS_LIB", "QT_NO_CAST_FROM_ASCII"])
Properties {
condition: qbs.targetOS == "windows"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment