From c908a52628e0f4abae258fd2aaa8bc92bcc59008 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Tue, 29 May 2018 12:26:56 +0200 Subject: Squish: Update to re-uploaded text This should not expire after another year. Change-Id: I86ed49d491f619509e6bd32fc2624df2a1c24f5f Reviewed-by: Christian Stenger --- tests/system/suite_tools/tst_codepasting/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system/suite_tools/tst_codepasting/test.py b/tests/system/suite_tools/tst_codepasting/test.py index ed9c405220..023d785312 100644 --- a/tests/system/suite_tools/tst_codepasting/test.py +++ b/tests/system/suite_tools/tst_codepasting/test.py @@ -155,7 +155,7 @@ def main(): skippedPasting = True description = "Paste from 2017-05-11" if protocol == NAME_KDE: - pasteId = "pyy2xvjh7" # valid for one year + pasteId = "pysjk6n2i" pastedText = readFile(os.path.join(os.getcwd(), "testdata", "main-prepasted.cpp")) elif skipPastingToPastebinCom and protocol == NAME_PBCOM: pasteId = "8XHP0ZgH" @@ -186,7 +186,7 @@ def main(): clickButton(waitForObject(":*Qt Creator.Clear_QToolButton")) continue test.compare(filenameCombo.currentText, "%s: %s" % (protocol, pasteId), "Verify title of editor") - if protocol == NAME_PBCOM and pastedText.endswith("\n"): + if protocol in (NAME_KDE, NAME_PBCOM) and pastedText.endswith("\n"): pastedText = pastedText[:-1] test.compare(editor.plainText, pastedText, "Verify that pasted and fetched texts are the same") invokeMenuItem("File", "Close All") -- cgit v1.2.1 From 760a63293673271b74fdeac3d574f6113975078f Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 22 May 2018 13:33:27 +0200 Subject: Tools: Fix architecture detection for wininterrupt Previously, the detection relied on the variable CPU which is no longer set current versions of MSVC. Use newly introduced variable VSCMD_ARG_TGT_ARCH (MSVC 2017) or Platform (MSVC 2015) to detect 64bit. Change-Id: I705dbd7d3d7912c36e588a5ff399e65b4ca6f500 Reviewed-by: Christian Stenger Reviewed-by: Eike Ziller --- src/tools/wininterrupt/wininterrupt.pro | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tools/wininterrupt/wininterrupt.pro b/src/tools/wininterrupt/wininterrupt.pro index d7ea748d2a..5e4621cd5b 100644 --- a/src/tools/wininterrupt/wininterrupt.pro +++ b/src/tools/wininterrupt/wininterrupt.pro @@ -25,11 +25,14 @@ build_all:!build_pass { CONFIG += release } -ENV_CPU=$$(CPU) +# Check for VSCMD_ARG_TGT_ARCH (VS 17) or Platform=X64 (VS 13, 15) +# For older versions, fall back to hacky check on LIBPATH +ENV_TARGET_ARCH=$$(VSCMD_ARG_TGT_ARCH) +isEmpty(ENV_TARGET_ARCH):ENV_TARGET_ARCH = $$(Platform) ENV_LIBPATH=$$(LIBPATH) -contains(ENV_CPU, ^AMD64$) { +contains(ENV_TARGET_ARCH, .*64$) { TARGET = win64interrupt -} else:isEmpty(ENV_CPU):contains(ENV_LIBPATH, ^.*amd64.*$) { +} else:isEmpty(ENV_TARGET_ARCH):contains(ENV_LIBPATH, ^.*amd64.*$) { TARGET = win64interrupt } else { TARGET = win32interrupt -- cgit v1.2.1 From 1ddfb443b686ef04cc0e28363308ce70d01f0d73 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 24 May 2018 20:50:32 +0200 Subject: qmake: fix file id mapping lifetime management, take 2 turns out that ref-counting the vfs class is insufficient, as now the ProFile cache (which expires after a timeout) could outlive all VFS instances and thus refer to ids which were discarded and later re-used. to avoid this, we let the cache instance hold a reference to the vfs class. amends d03fb3506. Task-number: QTCREATORBUG-20524 Change-Id: Idd4478ffc1c2405b3b83df32fba45b1f687f6a18 Reviewed-by: Robert Loehning Reviewed-by: Tobias Hunger --- src/shared/proparser/qmakeparser.cpp | 6 ++++++ src/shared/proparser/qmakeparser.h | 2 +- src/shared/proparser/qmakevfs.cpp | 13 +++++++++++-- src/shared/proparser/qmakevfs.h | 3 +++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/shared/proparser/qmakeparser.cpp b/src/shared/proparser/qmakeparser.cpp index 6b0ae22e83..8d6ef622fd 100644 --- a/src/shared/proparser/qmakeparser.cpp +++ b/src/shared/proparser/qmakeparser.cpp @@ -42,11 +42,17 @@ QT_BEGIN_NAMESPACE // /////////////////////////////////////////////////////////////////////// +ProFileCache::ProFileCache() +{ + QMakeVfs::ref(); +} + ProFileCache::~ProFileCache() { foreach (const Entry &ent, parsed_files) if (ent.pro) ent.pro->deref(); + QMakeVfs::deref(); } void ProFileCache::discardFile(const QString &fileName, QMakeVfs *vfs) diff --git a/src/shared/proparser/qmakeparser.h b/src/shared/proparser/qmakeparser.h index 0612b92262..a0c1ca17f1 100644 --- a/src/shared/proparser/qmakeparser.h +++ b/src/shared/proparser/qmakeparser.h @@ -197,7 +197,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QMakeParser::ParseFlags) class QMAKE_EXPORT ProFileCache { public: - ProFileCache() {} + ProFileCache(); ~ProFileCache(); void discardFile(int id); diff --git a/src/shared/proparser/qmakevfs.cpp b/src/shared/proparser/qmakevfs.cpp index c5c5b75c74..f438978bad 100644 --- a/src/shared/proparser/qmakevfs.cpp +++ b/src/shared/proparser/qmakevfs.cpp @@ -49,13 +49,23 @@ QMakeVfs::QMakeVfs() #ifndef QT_NO_TEXTCODEC m_textCodec = 0; #endif + ref(); +} + +QMakeVfs::~QMakeVfs() +{ + deref(); +} + +void QMakeVfs::ref() +{ #ifdef PROEVALUATOR_THREAD_SAFE QMutexLocker locker(&s_mutex); #endif ++s_refCount; } -QMakeVfs::~QMakeVfs() +void QMakeVfs::deref() { #ifdef PROEVALUATOR_THREAD_SAFE QMutexLocker locker(&s_mutex); @@ -67,7 +77,6 @@ QMakeVfs::~QMakeVfs() } } - #ifdef PROPARSER_THREAD_SAFE QMutex QMakeVfs::s_mutex; #endif diff --git a/src/shared/proparser/qmakevfs.h b/src/shared/proparser/qmakevfs.h index 34dd96fd7b..00547cf7fc 100644 --- a/src/shared/proparser/qmakevfs.h +++ b/src/shared/proparser/qmakevfs.h @@ -74,6 +74,9 @@ public: QMakeVfs(); ~QMakeVfs(); + static void ref(); + static void deref(); + int idForFileName(const QString &fn, VfsFlags flags); QString fileNameForId(int id); bool writeFile(int id, QIODevice::OpenMode mode, VfsFlags flags, const QString &contents, QString *errStr); -- cgit v1.2.1