From 2c403df66099b278732ece3aa5647b5bc9903748 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 23 Nov 2009 11:00:43 +0100 Subject: [PATCH 1/8] Debugger: Fix setting of integer formats per type. Reviewed-by: hjk --- src/plugins/debugger/watchhandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index 679fec5005c..82c694880ba 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -724,8 +724,8 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const switch (idx.column()) { case 0: return data.name; case 1: return formattedValue(data, - m_handler->m_individualFormats[data.iname], - m_handler->m_typeFormats[data.type]); + m_handler->m_individualFormats.value(data.iname, -1), + m_handler->m_typeFormats.value(data.type, -1)); case 2: if (!data.displayedType.isEmpty()) return data.displayedType; From 7def179a9874ef9cbeec8f824bcf35acc42d9253 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 23 Nov 2009 11:01:49 +0100 Subject: [PATCH 2/8] CDB: Convert 64bit pointers correctly. Adapt to the output format "0x0000000`0046535C". Reviewed-by: hjk --- .../debugger/cdb/cdbsymbolgroupcontext.cpp | 42 ++++++++++++------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/src/plugins/debugger/cdb/cdbsymbolgroupcontext.cpp b/src/plugins/debugger/cdb/cdbsymbolgroupcontext.cpp index 2efd3672b96..feb73530ce8 100644 --- a/src/plugins/debugger/cdb/cdbsymbolgroupcontext.cpp +++ b/src/plugins/debugger/cdb/cdbsymbolgroupcontext.cpp @@ -401,18 +401,33 @@ QString CdbSymbolGroupContext::symbolINameAt(unsigned long index) const return m_inameIndexMap.key(index); } -// check for "0x000", "0x000 class X" +// Return hexadecimal pointer value from a CDB pointer value +// which look like "0x000032a" or "0x00000000`0250124a" on 64-bit systems. +static bool inline getPointerValue(QString stringValue, quint64 *value) +{ + *value = 0; + if (!stringValue.startsWith(QLatin1String("0x"))) + return false; + stringValue.remove(0, 2); + // Remove 64bit separator + if (stringValue.size() > 8 && stringValue.at(8) == QLatin1Char('`')) + stringValue.remove(8, 1); + bool ok; + *value = stringValue.toULongLong(&ok, 16); + return ok; +} + +// check for "0x000", "0x000 class X" or its 64-bit equivalents. static inline bool isNullPointer(const WatchData &wd) { if (!isPointerType(wd.type)) return false; - static const QRegExp hexNullPattern(QLatin1String("0x0+")); - Q_ASSERT(hexNullPattern.isValid()); - const int blankPos = wd.value.indexOf(QLatin1Char(' ')); - if (blankPos == -1) - return hexNullPattern.exactMatch(wd.value); - const QString addr = wd.value.mid(0, blankPos); - return hexNullPattern.exactMatch(addr); + QString stringValue = wd.value; + const int blankPos = stringValue.indexOf(QLatin1Char(' ')); + if (blankPos != -1) + stringValue.truncate(blankPos); + quint64 value; + return getPointerValue(stringValue, &value) && value == 0u; } // Fix a symbol group value. It is set to the class type for @@ -713,16 +728,11 @@ static inline bool getIntValue(CIDebugSymbolGroup *sg, int index, int *value) } // Get pointer value of symbol group ("0xAAB") +// Note that this is on "00000000`0250124a" on 64bit systems. static inline bool getPointerValue(CIDebugSymbolGroup *sg, int index, quint64 *value) { - *value = 0; - QString valueS = getSymbolString(sg, &IDebugSymbolGroup2::GetSymbolValueTextWide, index); - if (!valueS.startsWith(QLatin1String("0x"))) - return false; - valueS.remove(0, 2); - bool ok; - *value = valueS.toULongLong(&ok, 16); - return ok; + const QString stringValue = getSymbolString(sg, &IDebugSymbolGroup2::GetSymbolValueTextWide, index); + return getPointerValue(stringValue, value); } int CdbSymbolGroupContext::dumpQString(CIDebugDataSpaces *ds, WatchData *wd) From 2f3a16efcbf5c0b75d7cacbde8f9be4fad141c1b Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Mon, 23 Nov 2009 11:43:15 +0100 Subject: [PATCH 3/8] also patch .qmake.cache, fix list of files to patch in old patcher. --- src/tools/qpatch/files-to-patch-linux | 1 + src/tools/qtlibspatcher/qtlibspatchermain.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tools/qpatch/files-to-patch-linux b/src/tools/qpatch/files-to-patch-linux index 2cf70c97291..78ecaca240d 100644 --- a/src/tools/qpatch/files-to-patch-linux +++ b/src/tools/qpatch/files-to-patch-linux @@ -62,3 +62,4 @@ lib/pkgconfig/QtWebKit.pc lib/pkgconfig/QtXmlPatterns.pc lib/pkgconfig/QtXml.pc mkspecs/qconfig.pri +.qmake.cache diff --git a/src/tools/qtlibspatcher/qtlibspatchermain.cpp b/src/tools/qtlibspatcher/qtlibspatchermain.cpp index bf92cb3c1a6..9c25b59c7f2 100644 --- a/src/tools/qtlibspatcher/qtlibspatchermain.cpp +++ b/src/tools/qtlibspatcher/qtlibspatchermain.cpp @@ -169,7 +169,7 @@ bool patchDebugLibrariesWithQtPath(const char *baseQtPath) { "/bin/QtCored4.dll" }, { "/bin/QtGuid4.dll" }, { "/bin/QtHelpd4.dll" }, - { "/bin/QtNetworkd4.dll" }, + { "/bin/QtMultimediad.dll" }, { "/bin/QtNetworkd4.dll" }, { "/bin/QtOpenGLd4.dll" }, { "/bin/QtScriptd4.dll" }, From 40bc1ac07bbb3572198818718240f608940d4fcd Mon Sep 17 00:00:00 2001 From: con Date: Mon, 23 Nov 2009 12:54:13 +0100 Subject: [PATCH 4/8] Another fix for patched file file :name Reviewed-by: Daniel Molkentin --- src/tools/qtlibspatcher/qtlibspatchermain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/qtlibspatcher/qtlibspatchermain.cpp b/src/tools/qtlibspatcher/qtlibspatchermain.cpp index 9c25b59c7f2..5eef293828a 100644 --- a/src/tools/qtlibspatcher/qtlibspatchermain.cpp +++ b/src/tools/qtlibspatcher/qtlibspatchermain.cpp @@ -169,7 +169,7 @@ bool patchDebugLibrariesWithQtPath(const char *baseQtPath) { "/bin/QtCored4.dll" }, { "/bin/QtGuid4.dll" }, { "/bin/QtHelpd4.dll" }, - { "/bin/QtMultimediad.dll" }, + { "/bin/QtMultimediad4.dll" }, { "/bin/QtNetworkd4.dll" }, { "/bin/QtOpenGLd4.dll" }, { "/bin/QtScriptd4.dll" }, From 6894cd0b2ee5c788db407435f947d0128bc54c98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Mon, 23 Nov 2009 15:15:56 +0100 Subject: [PATCH 5/8] Fixed a potential issue with automatic brace matching When encountering a line that hasn't been highlighted yet, we need to abort the optimization for changing brace depth. Done with Roberto Raggi and mae. --- src/plugins/cppeditor/cpphighlighter.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/plugins/cppeditor/cpphighlighter.cpp b/src/plugins/cppeditor/cpphighlighter.cpp index b2db7a8e42c..ebc670db3e1 100644 --- a/src/plugins/cppeditor/cpphighlighter.cpp +++ b/src/plugins/cppeditor/cpphighlighter.cpp @@ -48,8 +48,6 @@ CppHighlighter::CppHighlighter(QTextDocument *document) : void CppHighlighter::highlightBlock(const QString &text) { - QTextCharFormat emptyFormat; - const int previousState = previousBlockState(); int state = 0, initialBraceDepth = 0; if (previousState != -1) { @@ -225,7 +223,7 @@ void CppHighlighter::highlightBlock(const QString &text) if (oldState == tokenize.state() && oldBraceDepth != braceDepth) { int delta = braceDepth - oldBraceDepth; QTextBlock block = currentBlock().next(); - while (block.isValid()) { + while (block.isValid() && block.userState() != -1) { TextEditDocumentLayout::changeBraceDepth(block, delta); block = block.next(); } From 2b6a1689726201c3498f8f021e2ef838143d8757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Mon, 23 Nov 2009 20:42:31 +0100 Subject: [PATCH 6/8] Don't wrap around the completion list when auto-repeating It can be a bit disturbing if the list suddenly jumps when you don't release the down or up key in time. Done with mae. --- src/plugins/texteditor/completionwidget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/texteditor/completionwidget.cpp b/src/plugins/texteditor/completionwidget.cpp index 7cdbac8577d..bb6cf900f4e 100644 --- a/src/plugins/texteditor/completionwidget.cpp +++ b/src/plugins/texteditor/completionwidget.cpp @@ -166,14 +166,16 @@ bool CompletionWidget::event(QEvent *e) closeList(currentIndex()); return true; case Qt::Key_Up: - if (currentIndex().row() == 0) { + if (!ke->isAutoRepeat() + && currentIndex().row() == 0) { setCurrentIndex(model()->index(model()->rowCount()-1, 0)); return true; } forwardKeys = false; break; case Qt::Key_Down: - if (currentIndex().row() == model()->rowCount()-1) { + if (!ke->isAutoRepeat() + && currentIndex().row() == model()->rowCount()-1) { setCurrentIndex(model()->index(0, 0)); return true; } From 7d1a3d7fe7f2faf969f94bb7eb9e46066008eaf3 Mon Sep 17 00:00:00 2001 From: dt Date: Wed, 21 Oct 2009 15:10:27 +0200 Subject: [PATCH 7/8] Fix a bug with selecting copying the right text to the Find dialog. To reproduce: Split editors. Select text in first editor. Select text in second editor. Invoke the find dialog. Notice that the text from the first editor was used. Reviewed-By: mae (cherry picked from commit fd0fbddebbf8b78398cc4d26e3bb36b8c445a307) --- src/plugins/find/findplugin.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/find/findplugin.cpp b/src/plugins/find/findplugin.cpp index 518ced182f2..03a51a94a9d 100644 --- a/src/plugins/find/findplugin.cpp +++ b/src/plugins/find/findplugin.cpp @@ -135,6 +135,8 @@ void FindPlugin::openFindFilter() QAction *action = qobject_cast(sender()); QTC_ASSERT(action, return); IFindFilter *filter = action->data().value(); + if (m_currentDocumentFind->candidateIsEnabled()) + m_currentDocumentFind->acceptCandidate(); QString currentFindString = (m_currentDocumentFind->isEnabled() ? m_currentDocumentFind->currentFindString() : ""); if (!currentFindString.isEmpty()) m_findDialog->setFindText(currentFindString); From 585f8f31499d331e166de78c45f6167316705a30 Mon Sep 17 00:00:00 2001 From: con Date: Tue, 24 Nov 2009 16:20:26 +0100 Subject: [PATCH 8/8] Better layout for qrc editor. Task-number: QTCREATORBUG-339 --- src/shared/qrceditor/qrceditor.ui | 83 +++++++++++++------------------ 1 file changed, 34 insertions(+), 49 deletions(-) diff --git a/src/shared/qrceditor/qrceditor.ui b/src/shared/qrceditor/qrceditor.ui index 0fe1b01b42e..739b0d8c003 100644 --- a/src/shared/qrceditor/qrceditor.ui +++ b/src/shared/qrceditor/qrceditor.ui @@ -11,9 +11,6 @@ - - -1 - 6 @@ -25,12 +22,6 @@ 0 - - - 200 - 200 - - @@ -75,53 +66,47 @@ Properties - - - - - 0 + + + QLayout::SetMinAndMaxSize + + + QFormLayout::ExpandingFieldsGrow + + + + + Alias: - - 6 + + + + + + + + + Prefix: - - - - - - - - - - Prefix: - - - - - - - Language: - - - - - - - - - - Alias: - - - - + + + + + + + + + Language: + + + + + - centralWidget - groupBox