qtcreator: Fix issue 615

https://github.com/Alexpux/MINGW-packages/issues/615

Launching Qt Creator with MSYSTEM env. var set caused
Python to use / as os.path.sep which caused debugging
to fail due to an issue in the Python dumpers code.

It needs to replace all '\' with '/' in filenames but
instead replaced all os.path.sep with '/', which when
os.path.sep is already '/' was a noop.
This commit is contained in:
Ray Donnelly
2015-05-09 15:58:11 +01:00
parent fefa6a1e08
commit bae34fec03
8 changed files with 152 additions and 518 deletions

View File

@@ -0,0 +1,68 @@
From eea8e932f3c3ca9157d961d57c80c5f297dff5c8 Mon Sep 17 00:00:00 2001
From: hjk <hjk@theqtcompany.com>
Date: Fri, 17 Apr 2015 11:19:58 +0200
Subject: [PATCH] Debugger: Fix jump to file/line breakpoint from disassembler
Triggered by double-clicking a normal source file+line breakpoint
while looking at some disassembly: We want to jump to the original
source file in that case.
Change-Id: Ia6eddcaf27e4160c7a989ab757315f5314f65d1e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
---
src/plugins/debugger/breakhandler.cpp | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index ee60ba1..2334e45 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -33,11 +33,18 @@
#include "debuggeractions.h"
#include "debuggercore.h"
#include "debuggerengine.h"
+#include "debuggerinternalconstants.h"
#include "debuggerstringutils.h"
#include "simplifytype.h"
+#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreplugin.h>
+#include <coreplugin/editormanager/editormanager.h>
+#include <coreplugin/idocument.h>
+
#include <extensionsystem/invoker.h>
#include <texteditor/textmark.h>
+#include <texteditor/texteditor.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
#include <utils/fileutils.h>
@@ -50,6 +57,7 @@
#include <QDir>
#include <QDebug>
+using namespace Core;
using namespace Utils;
namespace Debugger {
@@ -1171,10 +1179,15 @@ void BreakHandler::timerEvent(QTimerEvent *event)
void Breakpoint::gotoLocation() const
{
if (DebuggerEngine *engine = currentEngine()) {
- if (b->m_params.type == BreakpointByAddress)
+ if (b->m_params.type == BreakpointByAddress) {
engine->gotoLocation(b->m_params.address);
- else
- engine->gotoLocation(Location(b->markerFileName(), b->markerLineNumber(), false));
+ } else {
+ // Don't use gotoLocation as this ends up in disassembly
+ // if OperateByInstruction is on.
+ const QString file = QDir::cleanPath(b->markerFileName());
+ IEditor *editor = EditorManager::openEditor(file);
+ editor->gotoLine(b->markerLineNumber(), 0);
+ }
}
}
--
2.4.0

View File

@@ -1,229 +0,0 @@
From cd011cb7638ed6699c88451982ca3a052fa12eae Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Sun, 24 Aug 2014 20:33:40 +0100
Subject: [PATCH] autotools: Allow builds to be done in buildDir
configure is called using a relative path from buildDir
to the project directory and the configure command line
is updated to reflect changes to buildDir.
Change-Id: Ia9e8eef446efd21b6dcedef4668ff03adfd8a20c
---
.../autotoolsprojectmanager/autogenstep.cpp | 18 +++++++------
.../autotoolsprojectmanager/autoreconfstep.cpp | 10 ++++---
.../autotoolsbuildconfiguration.cpp | 14 ++++++++++
.../autotoolsbuildconfiguration.h | 3 +++
.../autotoolsprojectmanager/configurestep.cpp | 31 ++++++++++++++++++----
.../autotoolsprojectmanager/configurestep.h | 2 ++
6 files changed, 61 insertions(+), 17 deletions(-)
diff --git a/src/plugins/autotoolsprojectmanager/autogenstep.cpp b/src/plugins/autotoolsprojectmanager/autogenstep.cpp
index 33a4e13..28faed3 100644
--- a/src/plugins/autotoolsprojectmanager/autogenstep.cpp
+++ b/src/plugins/autotoolsprojectmanager/autogenstep.cpp
@@ -158,8 +158,9 @@ bool AutogenStep::init()
ProcessParameters *pp = processParameters();
pp->setMacroExpander(bc->macroExpander());
pp->setEnvironment(bc->environment());
- pp->setWorkingDirectory(bc->buildDirectory().toString());
- pp->setCommand(QLatin1String("autogen.sh"));
+ const QString projectDir(bc->target()->project()->projectDirectory().toString());
+ pp->setWorkingDirectory(projectDir);
+ pp->setCommand(QLatin1String("./autogen.sh"));
pp->setArguments(additionalArguments());
pp->resolveAll();
@@ -171,10 +172,10 @@ void AutogenStep::run(QFutureInterface<bool> &interface)
BuildConfiguration *bc = buildConfiguration();
// Check whether we need to run autogen.sh
- const QString buildDir = bc->buildDirectory().toString();
- const QFileInfo configureInfo(buildDir + QLatin1String("/configure"));
- const QFileInfo configureAcInfo(buildDir + QLatin1String("/configure.ac"));
- const QFileInfo makefileAmInfo(buildDir + QLatin1String("/Makefile.am"));
+ const QString projectDir(bc->target()->project()->projectDirectory().toString());
+ const QFileInfo configureInfo(projectDir + QLatin1String("/configure"));
+ const QFileInfo configureAcInfo(projectDir + QLatin1String("/configure.ac"));
+ const QFileInfo makefileAmInfo(projectDir + QLatin1String("/Makefile.am"));
if (!configureInfo.exists()
|| configureInfo.lastModified() < configureAcInfo.lastModified()
@@ -276,8 +277,9 @@ void AutogenStepConfigWidget::updateDetails()
ProcessParameters param;
param.setMacroExpander(bc->macroExpander());
param.setEnvironment(bc->environment());
- param.setWorkingDirectory(bc->buildDirectory().toString());
- param.setCommand(QLatin1String("autogen.sh"));
+ const QString projectDir(bc->target()->project()->projectDirectory().toString());
+ param.setWorkingDirectory(projectDir);
+ param.setCommand(QLatin1String("./autogen.sh"));
param.setArguments(m_autogenStep->additionalArguments());
m_summaryText = param.summary(displayName());
emit updateSummary();
diff --git a/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp b/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp
index f046b26..584cff8 100644
--- a/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp
+++ b/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp
@@ -157,7 +157,8 @@ bool AutoreconfStep::init()
ProcessParameters *pp = processParameters();
pp->setMacroExpander(bc->macroExpander());
pp->setEnvironment(bc->environment());
- pp->setWorkingDirectory(bc->buildDirectory().toString());
+ const QString projectDir(bc->target()->project()->projectDirectory().toString());
+ pp->setWorkingDirectory(projectDir);
pp->setCommand(QLatin1String("autoreconf"));
pp->setArguments(additionalArguments());
pp->resolveAll();
@@ -170,8 +171,8 @@ void AutoreconfStep::run(QFutureInterface<bool> &interface)
BuildConfiguration *bc = buildConfiguration();
// Check whether we need to run autoreconf
- const QString buildDir = bc->buildDirectory().toString();
- const QFileInfo configureInfo(buildDir + QLatin1String("/configure"));
+ const QString projectDir(bc->target()->project()->projectDirectory().toString());
+ const QFileInfo configureInfo(projectDir + QLatin1String("/configure"));
if (!configureInfo.exists())
m_runAutoreconf = true;
@@ -270,7 +271,8 @@ void AutoreconfStepConfigWidget::updateDetails()
ProcessParameters param;
param.setMacroExpander(bc->macroExpander());
param.setEnvironment(bc->environment());
- param.setWorkingDirectory(bc->buildDirectory().toString());
+ const QString projectDir(bc->target()->project()->projectDirectory().toString());
+ param.setWorkingDirectory(projectDir);
param.setCommand(QLatin1String("autoreconf"));
param.setArguments(m_autoreconfStep->additionalArguments());
m_summaryText = param.summary(displayName());
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
index 76acb72..aa593c1 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
+++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
@@ -223,3 +223,17 @@ BuildConfiguration::BuildType AutotoolsBuildConfiguration::buildType() const
// TODO: Should I return something different from Unknown?
return Unknown;
}
+
+void AutotoolsBuildConfiguration::setBuildDirectory(const Utils::FileName &directory)
+{
+ if (directory == buildDirectory())
+ return;
+ BuildConfiguration::setBuildDirectory(directory);
+ ProjectExplorer::BuildStepList *bsl = stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
+ foreach (BuildStep *bs, bsl->steps()) {
+ ConfigureStep *cs = qobject_cast<ConfigureStep *>(bs);
+ if (cs) {
+ cs->notifyBuildDirectoryChanged();
+ }
+ }
+}
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h
index b0ef03d..fdb4a07 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h
+++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h
@@ -60,6 +60,9 @@ protected:
AutotoolsBuildConfiguration(ProjectExplorer::Target *parent, AutotoolsBuildConfiguration *source);
friend class AutotoolsBuildSettingsWidget;
+
+private:
+ void setBuildDirectory(const Utils::FileName &directory);
};
class AutotoolsBuildConfigurationFactory : public ProjectExplorer::IBuildConfigurationFactory
diff --git a/src/plugins/autotoolsprojectmanager/configurestep.cpp b/src/plugins/autotoolsprojectmanager/configurestep.cpp
index 2f51863..06acfb9 100644
--- a/src/plugins/autotoolsprojectmanager/configurestep.cpp
+++ b/src/plugins/autotoolsprojectmanager/configurestep.cpp
@@ -54,6 +54,20 @@ using namespace ProjectExplorer;
const char CONFIGURE_ADDITIONAL_ARGUMENTS_KEY[] = "AutotoolsProjectManager.ConfigureStep.AdditionalArguments";
const char CONFIGURE_STEP_ID[] = "AutotoolsProjectManager.ConfigureStep";
+/////////////////////
+// Helper Function
+/////////////////////
+static QString projectDirRelativeToBuildDir(BuildConfiguration *bc) {
+ const QDir buildDir(bc->buildDirectory().toString());
+ QString projDirToBuildDir = buildDir.relativeFilePath(
+ bc->target()->project()->projectDirectory().toString());
+ if (projDirToBuildDir.isEmpty())
+ return QLatin1String("./");
+ if (!projDirToBuildDir.endsWith(QLatin1Char('/')))
+ projDirToBuildDir.append(QLatin1Char('/'));
+ return projDirToBuildDir;
+}
+
////////////////////////////////
// ConfigureStepFactory Class
////////////////////////////////
@@ -159,7 +173,7 @@ bool ConfigureStep::init()
pp->setMacroExpander(bc->macroExpander());
pp->setEnvironment(bc->environment());
pp->setWorkingDirectory(bc->buildDirectory().toString());
- pp->setCommand(QLatin1String("configure"));
+ pp->setCommand(projectDirRelativeToBuildDir(bc) + QLatin1String("configure"));
pp->setArguments(additionalArguments());
pp->resolveAll();
@@ -171,9 +185,9 @@ void ConfigureStep::run(QFutureInterface<bool>& interface)
BuildConfiguration *bc = buildConfiguration();
//Check whether we need to run configure
- QString buildDir = bc->buildDirectory().toString();
- const QFileInfo configureInfo(buildDir +QLatin1String("/configure"));
- const QFileInfo configStatusInfo(buildDir + QLatin1String("/config.status"));
+ const QString projectDir(bc->target()->project()->projectDirectory().toString());
+ const QFileInfo configureInfo(projectDir + QLatin1String("/configure"));
+ const QFileInfo configStatusInfo(bc->buildDirectory().toString() + QLatin1String("/config.status"));
if (!configStatusInfo.exists()
|| configStatusInfo.lastModified() < configureInfo.lastModified()) {
@@ -212,6 +226,11 @@ void ConfigureStep::setAdditionalArguments(const QString &list)
emit additionalArgumentsChanged(list);
}
+void ConfigureStep::notifyBuildDirectoryChanged()
+{
+ emit buildDirectoryChanged();
+}
+
QString ConfigureStep::additionalArguments() const
{
return m_additionalArguments;
@@ -255,6 +274,8 @@ ConfigureStepConfigWidget::ConfigureStepConfigWidget(ConfigureStep *configureSte
configureStep, SLOT(setAdditionalArguments(QString)));
connect(configureStep, SIGNAL(additionalArgumentsChanged(QString)),
this, SLOT(updateDetails()));
+ connect(configureStep, SIGNAL(buildDirectoryChanged(void)),
+ this, SLOT(updateDetails()));
}
QString ConfigureStepConfigWidget::displayName() const
@@ -275,7 +296,7 @@ void ConfigureStepConfigWidget::updateDetails()
param.setMacroExpander(bc->macroExpander());
param.setEnvironment(bc->environment());
param.setWorkingDirectory(bc->buildDirectory().toString());
- param.setCommand(QLatin1String("configure"));
+ param.setCommand(projectDirRelativeToBuildDir(bc) + QLatin1String("configure"));
param.setArguments(m_configureStep->additionalArguments());
m_summaryText = param.summary(displayName());
emit updateSummary();
diff --git a/src/plugins/autotoolsprojectmanager/configurestep.h b/src/plugins/autotoolsprojectmanager/configurestep.h
index 40ae1d0..99366d6 100644
--- a/src/plugins/autotoolsprojectmanager/configurestep.h
+++ b/src/plugins/autotoolsprojectmanager/configurestep.h
@@ -103,9 +103,11 @@ public:
public slots:
void setAdditionalArguments(const QString &list);
+ void notifyBuildDirectoryChanged();
signals:
void additionalArgumentsChanged(const QString &);
+ void buildDirectoryChanged();
protected:
ConfigureStep(ProjectExplorer::BuildStepList *bsl, ConfigureStep *bs);
--
2.1.0

View File

@@ -1,30 +0,0 @@
From 7e5fbdd1bb67c2a53101548063f130d7a4d9b14f Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Wed, 10 Sep 2014 00:17:42 +0100
Subject: [PATCH 1/2] autotools: Remove broken 'unchanged' check
Before m_buildDirectory gets changed buildDirectory() returns
a default of the projectDir and notifyBuildDirectoryChanged()
would not get called until the build directory was editted.
Change-Id: Ie31fb2722c663cd0f998458d536181f47c83a37d
---
src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
index aa593c1..dca4766 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
+++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
@@ -226,8 +226,6 @@ BuildConfiguration::BuildType AutotoolsBuildConfiguration::buildType() const
void AutotoolsBuildConfiguration::setBuildDirectory(const Utils::FileName &directory)
{
- if (directory == buildDirectory())
- return;
BuildConfiguration::setBuildDirectory(directory);
ProjectExplorer::BuildStepList *bsl = stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
foreach (BuildStep *bs, bsl->steps()) {
--
2.1.0

View File

@@ -0,0 +1,33 @@
From 3047101050991dca283360853c8f3403501d50d1 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Wed, 10 Sep 2014 00:17:42 +0100
Subject: [PATCH 1/2] autotools: Set a default buildDir
So that the un-changed optimisation in setBuildDirectory works
correctly.
Change-Id: Ie31fb2722c663cd0f998458d536181f47c83a37d
---
src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
index f17b1d7..29d3095 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
+++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
@@ -64,7 +64,11 @@ using namespace ProjectExplorer::Constants;
//////////////////////////////////////
AutotoolsBuildConfiguration::AutotoolsBuildConfiguration(Target *parent)
: BuildConfiguration(parent, Core::Id(AUTOTOOLS_BC_ID))
-{ }
+{
+ // /<foobar> is used so the un-changed check in setBuildDirectory() works correctly.
+ // The leading / is to avoid the relative the path expansion in BuildConfiguration::buildDirectory.
+ BuildConfiguration::setBuildDirectory(Utils::FileName::fromString(QString::fromLatin1("/<foobar>")));
+}
NamedWidget *AutotoolsBuildConfiguration::createConfigWidget()
{
--
2.4.0

View File

@@ -1,32 +0,0 @@
From 592fb8305313bfc67131bb6cc169bd9175c0c336 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Mon, 8 Sep 2014 23:59:30 +0100
Subject: [PATCH] debugger: Don't skip first char after "This GDB was
configured as \""
sizeof(needle) includes the \0 terminator, so the first letter of the
target triplet was being skipped too. This caused the architecture to
be mis-detected and (for us on MSYS2) the 32bit GDB to be selected in
64bit Kits."
Change-Id: Id54bc320baf6cc604f2d41fa7ff05aca0756a296
---
src/plugins/debugger/debuggeritem.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp
index f95d2e3..fe49240 100644
--- a/src/plugins/debugger/debuggeritem.cpp
+++ b/src/plugins/debugger/debuggeritem.cpp
@@ -110,7 +110,7 @@ void DebuggerItem::reinitializeFromFile()
// or "i686-linux-gnu"
int pos1 = ba.indexOf(needle);
if (pos1 != -1) {
- pos1 += int(sizeof(needle));
+ pos1 += int(sizeof(needle)-1);
int pos2 = ba.indexOf('"', pos1 + 1);
QByteArray target = ba.mid(pos1, pos2 - pos1);
int pos3 = target.indexOf("--target=");
--
2.1.0

View File

@@ -0,0 +1,37 @@
From 09a4253ff82f71d5de711b561b8c4b9f73b48f50 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Sat, 9 May 2015 14:49:19 +0100
Subject: [PATCH 2/2] Debugger: Handle case of os.path.sep being '/'
On MSYS2, if QtCreator is launched from one of the msys2 shells
then the MSYSTEM env. var is set and our Pythons set os.sep and
os.path.sep to '/' so that it aligns with the default separator
of those shells.
fromNativePath(str) then fails to convert '\' seprators embedded
in binaries since str.replace('/', '/') is a noop. The operation
we want here is to convert all '\' to '/' anyway so this is more
explicit regardless of any opinions on our choice to dynamically
vary os.sep and os.path.sep
Change-Id: I76c05b188abca41c6a1b516c68b584e0c06e7235
---
share/qtcreator/debugger/gdbbridge.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/share/qtcreator/debugger/gdbbridge.py b/share/qtcreator/debugger/gdbbridge.py
index d219689..e96fe86 100644
--- a/share/qtcreator/debugger/gdbbridge.py
+++ b/share/qtcreator/debugger/gdbbridge.py
@@ -1545,7 +1545,7 @@ class Dumper(DumperBase):
def stackListFrames(self, args):
def fromNativePath(str):
- return str.replace(os.path.sep, '/')
+ return str.replace('\\', '/')
limit = int(args['limit'])
if limit <= 0:
--
2.4.0

View File

@@ -8,7 +8,7 @@ __pre=
_base_ver=3.4.0
#_base_ver=3.2.2
pkgver=${_base_ver}${_pre}
pkgrel=1
pkgrel=2
pkgdesc='Cross-patform IDE (mingw-w64)'
url='http://qt-project.org'
install=qt-creator-${CARCH}.install
@@ -31,15 +31,14 @@ _pkgfqn="${_realname}-opensource-src-${_base_ver}${__pre}"
source=(#http://download.qt-project.org/development_releases/qtcreator/${_base_ver%.*}/${_base_ver}${__pre}/${_pkgfqn}.tar.gz
http://download.qt-project.org/official_releases/qtcreator/${pkgver%.*}/${pkgver}/${_pkgfqn}.tar.gz
0001-Qbs-Do-not-crash-when-using-simplified-project-view.patch
0001-autotools-Allow-builds-to-be-done-in-buildDir.patch
0001-autotools-Remove-broken-unchanged-check.patch
0001-autotools-Set-a-default-buildDir.patch
0002-Debugger-Handle-case-of-os.path.sep-being.patch
0002-autotools-Use-summaryInWorkdir.patch
0001-debugger-Don-t-skip-first-char-after-This-GDB-was-co.patch
0001-Debugger-Fix-jump-to-file-line-breakpoint-from-disas.patch
qt-creator-3.2.0-Allow-static-clang-via-LLVM_STATIC-env-var.patch
qt-creator-3.2.0-Allow-iOS-plugin-on-any-platform.patch
qt-creator-3.2.0-Define-QBS_INSTALL_DIR-as-relative-path.patch
qt-creator-3.2.0-qbs-CONFIG-add-qbs_enable_project_file_updates.patch
qt-creator-3.2.0-qbs-fileName-to-filePath.patch
qt-creator-3.2.0-MSYS2-autotools-run-shell-scripts-via-sh.patch
qt-creator-3.2.0-autotools-allow-non-Automake-Makefile-in-projects.patch
qt-creator-3.2.0-i[3456]86-and-x86-have-32bit-wordWidth.patch
@@ -48,15 +47,14 @@ source=(#http://download.qt-project.org/development_releases/qtcreator/${_base_v
noextract=(${_pkgfqn}.tar.gz)
sha256sums=('b80baf5be9b0421b3d951a8a0eb411a65cf008f4c753f5a80d205e90fa4fe112'
'18f59946054e667b56276f53ec544d4786c3c249fee6c0bd9b0b565ed4b7cf2d'
'6c34b2bad7a24c5922d237dc67fcced14e83d65116f77cd84aa80ae2ebd4aad9'
'2f45ff4c2806c90c36f19da07707fef213e50fbf8825fe169e1bce6349efacee'
'205d8637152d6e6e57c4a9d9c5146efa7fa16db5fb7b8cabc3bc5ded96823d8a'
'6217d0682c40ac586205abc835490b36ac79525fdefde5afd66e3b02daabd8a0'
'22253cf29a2c8effebb1cc8313a0f350cf993d7fc404763063e6bd8444fa61f1'
'12aef50d3c90dfd5bcd9ac98ebd89d29a23d2420e8adf9c65d818ee2219ef21b'
'f5652fc21b0ad7463f0286143a970292e0b5d05c980206639dc8f939973a580b'
'45b9fc82c7a9364450420920adcdb04a3b67eeb96f64733166da757a5ab91013'
'96c14f54577bf6cadf5c12018745666a9e99cd8d6a876c29a28b13599a8cb368'
'68133c95b70c1b54e55ab4c8b31023afe4ab9a33667e4510bda64c828b95e91e'
'1a1738379b0413484fd1ff3521b6bc85d034f5f964311d963dd044b4966b274b'
'8244e66b1604d10951f1b32be3269ef453c47e9eb1b80c30be79a124b697ae0a'
'2915cd4bf08643057129c26c0ce28caee14586fdf6a164a96e36ce0b37966427'
'0b0bba8bda0fd8247563e3827f58fe73baed17b09b9de6ea28375b7f1afa3ee1'
'79fc4d2ef02ff8f458b1b330c683c2a86397f056369c90176a9ddbeba3b719fd'
@@ -72,22 +70,18 @@ prepare() {
# Not needed for > 3.2.2
# patch -p1 -i "${srcdir}"/0001-Qbs-Do-not-crash-when-using-simplified-project-view.patch
# Attempting to upstream: https://codereview.qt-project.org/#/c/93073/
# patch -p1 -i "${srcdir}"/0001-autotools-Allow-builds-to-be-done-in-buildDir.patch
# Attempting to upstream: https://codereview.qt-project.org/#/c/94366/
patch -p1 -i "${srcdir}"/0001-autotools-Remove-broken-unchanged-check.patch
patch -p1 -i "${srcdir}"/0001-autotools-Set-a-default-buildDir.patch
patch -p1 -i "${srcdir}"/0002-Debugger-Handle-case-of-os.path.sep-being.patch
# patch -p1 -i "${srcdir}"/0002-autotools-Use-summaryInWorkdir.patch
[ -d ${srcdir}/${_pkgfqn}.old ] && rm -rf ${srcdir}/${_pkgfqn}.old
cp -rf ${srcdir}/${_pkgfqn} ${srcdir}/${_pkgfqn}.old
# Already upstreamed: https://codereview.qt-project.org/#/c/94248/
# patch -p1 -i "${srcdir}"/0001-debugger-Don-t-skip-first-char-after-This-GDB-was-co.patch
patch -p1 -i "${srcdir}"/0001-Debugger-Fix-jump-to-file-line-breakpoint-from-disas.patch
patch -p1 -i "${srcdir}"/qt-creator-3.2.0-Allow-static-clang-via-LLVM_STATIC-env-var.patch
patch -p1 -i "${srcdir}"/qt-creator-3.2.0-Allow-iOS-plugin-on-any-platform.patch
patch -p1 -i "${srcdir}"/qt-creator-3.2.0-Define-QBS_INSTALL_DIR-as-relative-path.patch
patch -p1 -i "${srcdir}"/qt-creator-3.2.0-qbs-CONFIG-add-qbs_enable_project_file_updates.patch
# This one is only needed if you want to use qbs-git instead of qbs.
# patch -p1 -i "${srcdir}"/qt-creator-3.2.0-qbs-fileName-to-filePath.patch
patch -p1 -i "${srcdir}"/qt-creator-3.2.0-MSYS2-autotools-run-shell-scripts-via-sh.patch
patch -p1 -i "${srcdir}"/qt-creator-3.2.0-autotools-allow-non-Automake-Makefile-in-projects.patch
patch -p1 -i "${srcdir}"/qt-creator-3.2.0-i[3456]86-and-x86-have-32bit-wordWidth.patch
@@ -111,7 +105,7 @@ build() {
_config_variant=release
fi
${MINGW_PREFIX}/bin/qmake.exe ../${_pkgfqn}/qtcreator.pro CONFIG+=${_config_variant}
make
make ${_config_variant}
make docs
}

View File

@@ -1,207 +0,0 @@
diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbsbuildstep.cpp qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbsbuildstep.cpp
--- qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbsbuildstep.cpp 2014-08-19 12:50:15.621530300 +0100
+++ qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbsbuildstep.cpp 2014-08-19 13:30:13.985530300 +0100
@@ -221,7 +221,7 @@
// Report errors:
foreach (const qbs::ErrorItem &item, m_job->error().items())
createTaskAndOutput(ProjectExplorer::Task::Error, item.description(),
- item.codeLocation().fileName(), item.codeLocation().line());
+ item.codeLocation().filePath(), item.codeLocation().line());
QbsProject *pro = static_cast<QbsProject *>(project());
diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbscleanstep.cpp qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbscleanstep.cpp
--- qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbscleanstep.cpp 2014-08-19 12:50:15.630530300 +0100
+++ qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbscleanstep.cpp 2014-08-19 13:30:13.989530300 +0100
@@ -181,7 +181,7 @@
// Report errors:
foreach (const qbs::ErrorItem &item, m_job->error().items()) {
createTaskAndOutput(ProjectExplorer::Task::Error, item.description(),
- item.codeLocation().fileName(), item.codeLocation().line());
+ item.codeLocation().filePath(), item.codeLocation().line());
}
QTC_ASSERT(m_fi, return);
diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbsinstallstep.cpp qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbsinstallstep.cpp
--- qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbsinstallstep.cpp 2014-08-19 12:50:15.608530300 +0100
+++ qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbsinstallstep.cpp 2014-08-19 13:30:13.992530300 +0100
@@ -191,7 +191,7 @@
// Report errors:
foreach (const qbs::ErrorItem &item, m_job->error().items()) {
createTaskAndOutput(ProjectExplorer::Task::Error, item.description(),
- item.codeLocation().fileName(), item.codeLocation().line());
+ item.codeLocation().filePath(), item.codeLocation().line());
}
QTC_ASSERT(m_fi, return);
diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbslogsink.cpp qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbslogsink.cpp
--- qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbslogsink.cpp 2014-08-19 12:50:15.666530300 +0100
+++ qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbslogsink.cpp 2014-08-19 13:30:13.995530300 +0100
@@ -72,7 +72,7 @@
foreach (const qbs::ErrorItem &item, warning.items())
emit newTask(ProjectExplorer::Task(ProjectExplorer::Task::Warning,
item.description(),
- Utils::FileName::fromString(item.codeLocation().fileName()),
+ Utils::FileName::fromString(item.codeLocation().filePath()),
item.codeLocation().line(),
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
}
diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbsnodes.cpp qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbsnodes.cpp
--- qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbsnodes.cpp 2014-08-19 12:50:15.616530300 +0100
+++ qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbsnodes.cpp 2014-08-19 13:30:13.999530300 +0100
@@ -348,7 +348,7 @@
setIcon(m_groupIcon);
- QbsFileNode *idx = new QbsFileNode(grp->location().fileName(),
+ QbsFileNode *idx = new QbsFileNode(grp->location().filePath(),
ProjectExplorer::ProjectFileType, false,
grp->location().line());
addFileNodes(QList<ProjectExplorer::FileNode *>() << idx);
@@ -428,7 +428,7 @@
m_productPath = productPath;
m_qbsGroupData = grp;
- setPath(grp->location().fileName());
+ setPath(grp->location().filePath());
setDisplayName(grp->name());
QbsFileNode *idx = 0;
@@ -438,7 +438,7 @@
break;
}
QTC_ASSERT(idx, return);
- idx->setPathAndLine(grp->location().fileName(), grp->location().line());
+ idx->setPathAndLine(grp->location().filePath(), grp->location().line());
setupFiles(this, grp->allFilePaths(), productPath, updateExisting);
@@ -545,14 +545,14 @@
// --------------------------------------------------------------------
QbsProductNode::QbsProductNode(const qbs::ProductData &prd) :
- QbsBaseProjectNode(prd.location().fileName())
+ QbsBaseProjectNode(prd.location().filePath())
{
if (m_productIcon.isNull())
m_productIcon = generateIcon(QString::fromLatin1(Constants::QBS_PRODUCT_OVERLAY_ICON));
setIcon(m_productIcon);
- ProjectExplorer::FileNode *idx = new QbsFileNode(prd.location().fileName(),
+ ProjectExplorer::FileNode *idx = new QbsFileNode(prd.location().filePath(),
ProjectExplorer::ProjectFileType, false,
prd.location().line());
addFileNodes(QList<ProjectExplorer::FileNode *>() << idx);
@@ -627,8 +627,8 @@
bool updateExisting = productWasEnabled != productIsEnabled;
setDisplayName(prd.name());
- setPath(prd.location().fileName());
- const QString &productPath = QFileInfo(prd.location().fileName()).absolutePath();
+ setPath(prd.location().filePath());
+ const QString &productPath = QFileInfo(prd.location().filePath()).absolutePath();
// Find the QbsFileNode we added earlier:
QbsFileNode *idx = 0;
@@ -638,7 +638,7 @@
break;
}
QTC_ASSERT(idx, return);
- idx->setPathAndLine(prd.location().fileName(), prd.location().line());
+ idx->setPathAndLine(prd.location().filePath(), prd.location().line());
QList<ProjectExplorer::ProjectNode *> toAdd;
QList<ProjectExplorer::ProjectNode *> toRemove = subProjectNodes();
@@ -726,7 +726,7 @@
foreach (const qbs::ProjectData &subData, prjData.subProjects()) {
QbsProjectNode *qn = findProjectNode(subData.name());
if (!qn) {
- QbsProjectNode *subProject = new QbsProjectNode(subData.location().fileName());
+ QbsProjectNode *subProject = new QbsProjectNode(subData.location().filePath());
subProject->update(subData);
toAdd << subProject;
} else {
@@ -831,13 +831,13 @@
static QSet<QString> referencedBuildSystemFiles(const qbs::ProjectData &data)
{
QSet<QString> result;
- result.insert(data.location().fileName());
+ result.insert(data.location().filePath());
foreach (const qbs::ProjectData &subProject, data.subProjects())
result.unite(referencedBuildSystemFiles(subProject));
foreach (const qbs::ProductData &product, data.products()) {
- result.insert(product.location().fileName());
+ result.insert(product.location().filePath());
foreach (const qbs::GroupData &group, product.groups())
- result.insert(group.location().fileName());
+ result.insert(group.location().filePath());
}
return result;
diff -urN qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbsproject.cpp qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbsproject.cpp
--- qt-creator-opensource-src-3.2.0.orig/src/plugins/qbsprojectmanager/qbsproject.cpp 2014-08-19 12:50:15.650530300 +0100
+++ qt-creator-opensource-src-3.2.0/src/plugins/qbsprojectmanager/qbsproject.cpp 2014-08-19 13:30:14.004530300 +0100
@@ -165,14 +165,14 @@
static void collectFilesForProject(const qbs::ProjectData &project, QSet<QString> &result)
{
- result.insert(project.location().fileName());
+ result.insert(project.location().filePath());
foreach (const qbs::ProductData &prd, project.products()) {
foreach (const qbs::GroupData &grp, prd.groups()) {
foreach (const QString &file, grp.allFilePaths())
result.insert(file);
- result.insert(grp.location().fileName());
+ result.insert(grp.location().filePath());
}
- result.insert(prd.location().fileName());
+ result.insert(prd.location().filePath());
}
foreach (const qbs::ProjectData &subProject, project.subProjects())
collectFilesForProject(subProject, result);
@@ -229,7 +229,7 @@
{
QTC_ASSERT(m_qbsProject.isValid(), return false);
QStringList allPaths = groupData.allFilePaths();
- const QString productFilePath = productData.location().fileName();
+ const QString productFilePath = productData.location().filePath();
ChangeExpector expector(productFilePath, m_qbsDocuments);
foreach (const QString &path, filePaths) {
qbs::ErrorInfo err = m_qbsProject.addFiles(productData, groupData, QStringList() << path);
@@ -254,7 +254,7 @@
{
QTC_ASSERT(m_qbsProject.isValid(), return false);
QStringList allPaths = groupData.allFilePaths();
- const QString productFilePath = productData.location().fileName();
+ const QString productFilePath = productData.location().filePath();
ChangeExpector expector(productFilePath, m_qbsDocuments);
foreach (const QString &path, filePaths) {
qbs::ErrorInfo err
@@ -546,7 +546,7 @@
foreach (const qbs::ErrorItem &item, e.items())
TaskHub::addTask(Task::Error, item.description(),
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM,
- FileName::fromString(item.codeLocation().fileName()),
+ FileName::fromString(item.codeLocation().filePath()),
item.codeLocation().line());
}
@@ -690,7 +690,7 @@
part->project = this;
part->displayName = grp.name();
part->projectFile = QString::fromLatin1("%1:%2:%3")
- .arg(grp.location().fileName())
+ .arg(grp.location().filePath())
.arg(grp.location().line())
.arg(grp.location().column());
part->evaluateToolchain(ToolChainKitInformation::toolChain(k),
@@ -761,7 +761,7 @@
if (!ta.isExecutable())
continue;
applications.list << ProjectExplorer::BuildTargetInfo(Utils::FileName::fromString(ta.filePath()),
- Utils::FileName::fromString(productData.location().fileName()));
+ Utils::FileName::fromString(productData.location().filePath()));
}
}
activeTarget()->setApplicationTargets(applications);