diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-08-28 17:33:47 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-08-29 14:10:41 +0200 |
commit | 1d5091e48f6df341dbd4436843c25afe25cbf4ce (patch) | |
tree | 9151d71b36bcffbba219ef1a0fc4e4f234adbc89 /src/plugins/texteditor | |
parent | 7ba0f8a4c42c5db144b599861f38d2e771e0dafe (diff) |
Do not use deprecated Qt functionality.
Replace all* remaining deprecated Qt 4 functions with
their Qt 5 counterparts. This means we no longer need to
define the QT_DISABLE_DEPRECATED_BEFORE macro.
This patch is relatively small because most source-compatible
changes of this kind have been done before.
* The one exception is the QmlDesigner, which uses QWeakPointer
in a deprecated way all over the place.
Change-Id: Id4b839c6685f3b5bdf2b89137f95231758ec53c7
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/texteditor')
4 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/texteditor/basehoverhandler.cpp b/src/plugins/texteditor/basehoverhandler.cpp index 3b0e5845ab..d382548a10 100644 --- a/src/plugins/texteditor/basehoverhandler.cpp +++ b/src/plugins/texteditor/basehoverhandler.cpp @@ -159,12 +159,12 @@ void BaseHoverHandler::process(BaseTextEditor *editor, int pos) void BaseHoverHandler::decorateToolTip() { if (Qt::mightBeRichText(toolTip())) - setToolTip(Qt::escape(toolTip())); + setToolTip(toolTip().toHtmlEscaped()); if (!isDiagnosticTooltip() && lastHelpItemIdentified().isValid()) { const QString &contents = lastHelpItemIdentified().extractContent(false); if (!contents.isEmpty()) { - setToolTip(Qt::escape(toolTip())); + setToolTip(toolTip().toHtmlEscaped()); appendToolTip(contents); addF1ToToolTip(); } diff --git a/src/plugins/texteditor/generichighlighter/managedefinitionsdialog.cpp b/src/plugins/texteditor/generichighlighter/managedefinitionsdialog.cpp index a794a65017..1960fdb5ed 100644 --- a/src/plugins/texteditor/generichighlighter/managedefinitionsdialog.cpp +++ b/src/plugins/texteditor/generichighlighter/managedefinitionsdialog.cpp @@ -52,7 +52,7 @@ ManageDefinitionsDialog::ManageDefinitionsDialog( ui.setupUi(this); ui.definitionsTable->setHorizontalHeaderLabels( QStringList() << tr("Name") << tr("Installed") << tr("Available")); - ui.definitionsTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch); + ui.definitionsTable->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch); setWindowTitle(tr("Download Definitions")); diff --git a/src/plugins/texteditor/snippets/snippet.cpp b/src/plugins/texteditor/snippets/snippet.cpp index d7f8a4296a..cc693a0d33 100644 --- a/src/plugins/texteditor/snippets/snippet.cpp +++ b/src/plugins/texteditor/snippets/snippet.cpp @@ -164,7 +164,7 @@ QString Snippet::generateTip() const static const QLatin1String kCloseBold("</b>"); static const QLatin1String kEllipsis("..."); - QString escapedContent(Qt::escape(m_content)); + QString escapedContent(m_content.toHtmlEscaped()); escapedContent.replace(kNewLine, kBr); escapedContent.replace(kSpace, kNbsp); diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp index 2aec39c991..ac475740b8 100644 --- a/src/plugins/texteditor/texteditoractionhandler.cpp +++ b/src/plugins/texteditor/texteditoractionhandler.cpp @@ -330,7 +330,7 @@ void TextEditorActionHandlerPrivate::createActions() QKeySequence(Qt::Key_F2)); m_jumpToFileInNextSplitAction = registerAction(JUMP_TO_FILE_UNDER_CURSOR_IN_NEXT_SPLIT, [this] (BaseTextEditorWidget *w) { w->openLinkUnderCursorInNextSplit(); }, true, - QKeySequence(Utils::HostOsInfo::isMacHost() ? tr("Meta+E, F2") : tr("Ctrl+E, F2"))); + QKeySequence(Utils::HostOsInfo::isMacHost() ? tr("Meta+E, F2") : tr("Ctrl+E, F2")).toString()); m_viewPageUpAction = registerAction(VIEW_PAGE_UP, [this] (BaseTextEditorWidget *w) { w->viewPageUp(); }, true, tr("Move the View a Page Up and Keep the Cursor Position"), |