diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-01-29 22:14:44 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-01-29 22:14:44 +0100 |
commit | 43203140461174071f7a3e68bf388a6522556810 (patch) | |
tree | d48d06f660ab013d79b3dc9ed3b782e2efc12bae /src | |
parent | 3afe252e1ffe5380dc49f84bcc70c20850de1083 (diff) | |
parent | 07da7ccfdf6e991c282dafdc9b4337db81a1a054 (diff) | |
download | qt-creator-43203140461174071f7a3e68bf388a6522556810.tar.gz |
Merge branch 'origin/1.3' (early part)
Conflicts:
src/plugins/debugger/gdb/trkgdbadapter.cpp
src/plugins/projectexplorer/projectexplorer.cpp
src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
src/plugins/texteditor/basetexteditor.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/coreplugin/coreconstants.h | 2 | ||||
-rw-r--r-- | src/plugins/debugger/gdb/trkgdbadapter.cpp | 6 | ||||
-rw-r--r-- | src/plugins/texteditor/basetexteditor.cpp | 27 |
3 files changed, 23 insertions, 12 deletions
diff --git a/src/plugins/coreplugin/coreconstants.h b/src/plugins/coreplugin/coreconstants.h index eeb288c599..9c4ac9d1e6 100644 --- a/src/plugins/coreplugin/coreconstants.h +++ b/src/plugins/coreplugin/coreconstants.h @@ -48,7 +48,7 @@ namespace Constants { const char * const IDE_VERSION_LONG = IDE_VERSION; const char * const IDE_AUTHOR = "Nokia Corporation"; -const char * const IDE_YEAR = "2009"; +const char * const IDE_YEAR = "2010"; #ifdef IDE_REVISION const char * const IDE_REVISION_STR = STRINGIFY(IDE_REVISION); diff --git a/src/plugins/debugger/gdb/trkgdbadapter.cpp b/src/plugins/debugger/gdb/trkgdbadapter.cpp index 5b883f424f..b3e0a79ff7 100644 --- a/src/plugins/debugger/gdb/trkgdbadapter.cpp +++ b/src/plugins/debugger/gdb/trkgdbadapter.cpp @@ -203,7 +203,6 @@ void Snapshot::insertMemory(const MemoryRange &range, const QByteArray &ba) // Not combinable, add chunk. memory.insert(range, ba); } - /////////////////////////////////////////////////////////////////////////// // // TrkGdbAdapter @@ -1795,8 +1794,7 @@ void TrkGdbAdapter::handleCreateProcess(const TrkResult &result) logMessage(startMsg); - const QByteArray symbolFile = m_symbolFile.toLocal8Bit(); - if (symbolFile.isEmpty()) { + if (m_symbolFile.isEmpty()) { logMessage(_("WARNING: No symbol file available.")); } else { // Does not seem to be necessary anymore. @@ -1804,7 +1802,7 @@ void TrkGdbAdapter::handleCreateProcess(const TrkResult &result) // have to wait for the TRK startup to learn the load address. //m_engine->postCommand("add-symbol-file \"" + symbolFile + "\" " // + QByteArray::number(m_session.codeseg)); - m_engine->postCommand("symbol-file \"" + symbolFile + "\""); + m_engine->postCommand("symbol-file \"" + m_symbolFile.toLatin1() + "\""); } m_engine->postCommand("set breakpoint always-inserted on"); m_engine->postCommand("set trust-readonly-sections"); // No difference? diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 94f4f6e5c3..d54ee3f6e2 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -2243,6 +2243,13 @@ void BaseTextEditorPrivate::moveCursorVisible(bool ensureVisible) q->ensureCursorVisible(); } +static QColor blendColors(const QColor &a, const QColor &b, int alpha) +{ + return QColor((a.red() * (256 - alpha) + b.red() * alpha) / 256, + (a.green() * (256 - alpha) + b.green() * alpha) / 256, + (a.blue() * (256 - alpha) + b.blue() * alpha) / 256); +} + static QColor calcBlendColor(const QColor &baseColor, int level, int count) { QColor color80; @@ -2277,10 +2284,7 @@ static QColor calcBlendColor(const QColor &baseColor, int level, int count) const int blendFactor = level * (256 / (count - 2)); - return QColor( - (color90.red() * blendFactor + color80.red() * (256 - blendFactor)) / 256, - (color90.green() * blendFactor + color80.green() * (256 - blendFactor)) / 256, - (color90.blue() * blendFactor + color80.blue() * (256 - blendFactor)) / 256); + return blendColors(color80, color90, blendFactor); } void BaseTextEditor::paintEvent(QPaintEvent *e) @@ -2310,9 +2314,18 @@ void BaseTextEditor::paintEvent(QPaintEvent *e) if (d->m_visibleWrapColumn > 0) { lineX = fontMetrics().averageCharWidth() * d->m_visibleWrapColumn + offset.x() + 4; - if (lineX < viewportRect.width()) - painter.fillRect(QRectF(lineX, 0, viewportRect.width() - lineX, viewportRect.height()), - d->m_ifdefedOutFormat.background()); + + if (lineX < viewportRect.width()) { + const QColor backgroundColor = d->m_ifdefedOutFormat.background().color(); + painter.fillRect(QRectF(lineX, er.top(), viewportRect.width() - lineX, er.height()), + backgroundColor); + + const QColor col = (palette().base().color().value() > 128) ? Qt::black : Qt::white; + const QPen pen = painter.pen(); + painter.setPen(blendColors(backgroundColor, col, 32)); + painter.drawLine(QPointF(lineX, er.top()), QPointF(lineX, er.bottom())); + painter.setPen(pen); + } } // Set a brush origin so that the WaveUnderline knows where the wave started |