aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpaster/cpasterplugin.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2018-11-04 23:43:17 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2018-11-08 10:22:59 +0000
commit26686c384fb950f6643a15400260c974e35a47a3 (patch)
tree9fac79bf6591a69749f9da75e13beecb9462639c /src/plugins/cpaster/cpasterplugin.cpp
parentbeda0205d1fd8b3c04ffdb0612679f20b06b1789 (diff)
CodePaster: Modernize
modernize-use-auto modernize-use-nullptr modernize-use-equals-default Change-Id: I3d9fffef3bccc1a64e24acd0846da57b224ba801 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/cpaster/cpasterplugin.cpp')
-rw-r--r--src/plugins/cpaster/cpasterplugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp
index 1aad17f8512..a101598e8bf 100644
--- a/src/plugins/cpaster/cpasterplugin.cpp
+++ b/src/plugins/cpaster/cpasterplugin.cpp
@@ -116,7 +116,7 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *errorMe
// Create the settings Page
m_settings->fromSettings(ICore::settings());
- SettingsPage *settingsPage = new SettingsPage(m_settings, this);
+ auto settingsPage = new SettingsPage(m_settings, this);
// Create the protocols and append them to the Settings
Protocol *protos[] = {new PasteBinDotComProtocol,
@@ -191,7 +191,7 @@ static inline void textFromCurrentEditor(QString *text, QString *mimeType)
return;
const IDocument *document = editor->document();
QString data;
- if (const BaseTextEditor *textEditor = qobject_cast<const BaseTextEditor *>(editor))
+ if (auto textEditor = qobject_cast<const BaseTextEditor *>(editor))
data = textEditor->selectedText();
if (data.isEmpty()) {
if (auto textDocument = qobject_cast<const TextDocument *>(document)) {