aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Wenninger <jowenn@kde.org>2014-01-21 01:33:04 (GMT)
committerJoseph Wenninger <jowenn@kde.org>2014-01-21 01:33:04 (GMT)
commite22fc431712f2c58a96d0f48b0f40776f952addb (patch)
treeaade8c6af9d1d7d43268829daccfaad2137ec137
parent1f64cf2170409537ddac30eee997b7734af3f753 (diff)
A littlebit of QLatin1String to QStringLiteral conversion
-rw-r--r--addons/kate/filebrowser/katebookmarkhandler.cpp8
-rw-r--r--addons/kate/filebrowser/katefilebrowser.cpp35
-rw-r--r--addons/kate/filebrowser/katefilebrowserconfig.cpp20
-rw-r--r--addons/kate/filebrowser/katefilebrowserplugin.cpp6
-rw-r--r--addons/kate/konsole/kateconsole.cpp30
-rw-r--r--addons/kate/openheader/plugin_kateopenheader.cpp20
-rw-r--r--addons/kate/project/kateproject.cpp14
-rw-r--r--addons/kate/project/kateproject.h2
-rw-r--r--addons/kate/project/kateprojectcompletion.cpp2
-rw-r--r--addons/kate/project/kateprojectindex.cpp8
-rw-r--r--addons/kate/project/kateprojectinfoviewcodeanalysis.cpp12
-rw-r--r--addons/kate/project/kateprojectinfoviewterminal.cpp2
-rw-r--r--addons/kate/project/kateprojectitem.cpp10
-rw-r--r--addons/kate/project/kateprojectplugin.cpp6
-rw-r--r--addons/kate/project/kateprojectpluginview.cpp16
-rw-r--r--addons/kate/project/kateprojecttreeviewcontextmenu.cpp24
-rw-r--r--addons/kate/project/kateprojectworker.cpp54
-rw-r--r--kate/app/kateapp.cpp30
-rw-r--r--kate/app/kateappadaptor.cpp4
-rw-r--r--kate/app/kateappcommands.cpp38
-rw-r--r--kate/app/kateconfigdialog.cpp16
-rw-r--r--kate/app/katedocmanager.cpp4
-rw-r--r--kate/app/katemainwindow.cpp68
-rw-r--r--kate/app/katemdi.cpp26
-rw-r--r--kate/app/katemwmodonhddialog.cpp12
-rw-r--r--kate/app/katepluginmanager.cpp8
-rw-r--r--kate/app/katequickopen.cpp2
-rw-r--r--kate/app/katerunninginstanceinfo.cpp2
-rw-r--r--kate/app/katerunninginstanceinfo.h2
-rw-r--r--kate/app/katesavemodifieddialog.cpp8
-rw-r--r--kate/app/kateviewmanager.cpp54
-rw-r--r--kate/app/kateviewspace.cpp12
-rw-r--r--kate/app/main.cpp90
-rw-r--r--kate/session/katesessionchooser.cpp4
-rw-r--r--kate/session/katesessionmanagedialog.cpp2
-rw-r--r--kate/session/katesessionmanager.cpp18
-rw-r--r--kate/session/katesessionopendialog.cpp2
-rw-r--r--kate/session/katesessionsaction.cpp2
-rw-r--r--kwrite/kwrite.cpp32
-rw-r--r--kwrite/main.cpp76
40 files changed, 390 insertions, 391 deletions
diff --git a/addons/kate/filebrowser/katebookmarkhandler.cpp b/addons/kate/filebrowser/katebookmarkhandler.cpp
index 0415b8a..fb37125 100644
--- a/addons/kate/filebrowser/katebookmarkhandler.cpp
+++ b/addons/kate/filebrowser/katebookmarkhandler.cpp
@@ -34,15 +34,15 @@ KateBookmarkHandler::KateBookmarkHandler( KateFileBrowser *parent, QMenu* kpopup
mParent( parent ),
m_menu( kpopupmenu )
{
- setObjectName( QLatin1String ("KateBookmarkHandler") );
+ setObjectName( QStringLiteral ("KateBookmarkHandler") );
if (!m_menu)
m_menu = new QMenu( parent);
- QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("kate/fsbookmarks.xml"));
+ QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kate/fsbookmarks.xml"));
if ( file.isEmpty() )
- file = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/kate/fsbookmarks.xml");
+ file = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/kate/fsbookmarks.xml");
- KBookmarkManager *manager = KBookmarkManager::managerForFile( file, QLatin1String("kate") );
+ KBookmarkManager *manager = KBookmarkManager::managerForFile( file, QStringLiteral("kate") );
manager->setUpdate( true );
m_bookmarkMenu = new KBookmarkMenu( manager, this, m_menu, parent->actionCollection() );
diff --git a/addons/kate/filebrowser/katefilebrowser.cpp b/addons/kate/filebrowser/katefilebrowser.cpp
index ca0af71..950ef46 100644
--- a/addons/kate/filebrowser/katefilebrowser.cpp
+++ b/addons/kate/filebrowser/katefilebrowser.cpp
@@ -56,7 +56,6 @@ KateFileBrowser::KateFileBrowser(KTextEditor::MainWindow *mainWindow,
: QWidget (parent)
, m_mainWindow(mainWindow)
{
- setObjectName( QLatin1String (name) );
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setMargin(0);
@@ -85,7 +84,7 @@ KateFileBrowser::KateFileBrowser(KTextEditor::MainWindow *mainWindow,
// Mime filter for the KDirOperator
QStringList filter;
- filter << QLatin1String("text/plain") << QLatin1String("text/html") << QLatin1String("inode/directory");
+ filter << QStringLiteral("text/plain") << QStringLiteral("text/html") << QStringLiteral("inode/directory");
m_dirOperator->setNewFileMenuSupportedMimeTypes(filter);
setFocusProxy(m_dirOperator);
@@ -140,7 +139,7 @@ void KateFileBrowser::setupToolbar()
KConfigGroup config(KSharedConfig::openConfig(), "filebrowser");
QStringList actions = config.readEntry( "toolbar actions", QStringList() );
if ( actions.isEmpty() ) // default toolbar
- actions << QLatin1String("back") << QLatin1String("forward") << QLatin1String("bookmarks") << QLatin1String("sync_dir") << QLatin1String("configure");
+ actions << QStringLiteral("back") << QStringLiteral("forward") << QStringLiteral("bookmarks") << QStringLiteral("sync_dir") << QStringLiteral("configure");
// remove all actions from the toolbar (there should be none)
m_toolbar->clear();
@@ -150,7 +149,7 @@ void KateFileBrowser::setupToolbar()
{
QAction *ac = 0;
if (it.isEmpty()) continue;
- if (it == QLatin1String("bookmarks") || it == QLatin1String("sync_dir") || it == QLatin1String("configure"))
+ if (it == QStringLiteral("bookmarks") || it == QStringLiteral("sync_dir") || it == QStringLiteral("configure"))
ac = actionCollection()->action(it);
else
ac = m_dirOperator->actionCollection()->action(it);
@@ -187,7 +186,7 @@ void KateFileBrowser::writeSessionConfig (KConfigGroup& cg)
void KateFileBrowser::slotFilterChange(const QString & nf)
{
QString f = nf.trimmed();
- const bool empty = f.isEmpty() || f == QLatin1String("*");
+ const bool empty = f.isEmpty() || f == QStringLiteral("*");
if (empty) {
m_dirOperator->clearFilter();
@@ -219,7 +218,7 @@ void KateFileBrowser::setDir(QUrl u)
newurl.setPath(newurl.path() + QLatin1Char('/'));
if (!kateFileSelectorIsReadable(newurl)) {
- newurl.setPath(newurl.path() + QLatin1String("../"));
+ newurl.setPath(newurl.path() + QStringLiteral("../"));
newurl = newurl.adjusted(QUrl::NormalizePathSegments);
}
@@ -304,7 +303,7 @@ QUrl KateFileBrowser::activeDocumentUrl()
void KateFileBrowser::setupActions()
{
// bookmarks action!
- KActionMenu *acmBookmarks = new KActionMenu(QIcon::fromTheme(QLatin1String("bookmarks")), i18n("Bookmarks"), this);
+ KActionMenu *acmBookmarks = new KActionMenu(QIcon::fromTheme(QStringLiteral("bookmarks")), i18n("Bookmarks"), this);
acmBookmarks->setDelayed(false);
m_bookmarkHandler = new KateBookmarkHandler(this, acmBookmarks->menu());
acmBookmarks->setShortcutContext(Qt::WidgetWithChildrenShortcut);
@@ -313,31 +312,31 @@ void KateFileBrowser::setupActions()
QAction* syncFolder = new QAction(this);
syncFolder->setShortcutContext(Qt::WidgetWithChildrenShortcut);
syncFolder->setText(i18n("Current Document Folder"));
- syncFolder->setIcon(QIcon::fromTheme(QLatin1String("system-switch-user")));
+ syncFolder->setIcon(QIcon::fromTheme(QStringLiteral("system-switch-user")));
connect(syncFolder, SIGNAL(triggered()), this, SLOT(setActiveDocumentDir()));
- m_actionCollection->addAction(QLatin1String("sync_dir"), syncFolder);
- m_actionCollection->addAction(QLatin1String("bookmarks"), acmBookmarks);
+ m_actionCollection->addAction(QStringLiteral("sync_dir"), syncFolder);
+ m_actionCollection->addAction(QStringLiteral("bookmarks"), acmBookmarks);
// section for settings menu
- KActionMenu *optionsMenu = new KActionMenu(QIcon::fromTheme(QLatin1String("configure")), i18n("Options"), this);
+ KActionMenu *optionsMenu = new KActionMenu(QIcon::fromTheme(QStringLiteral("configure")), i18n("Options"), this);
optionsMenu->setDelayed(false);
- optionsMenu->addAction(m_dirOperator->actionCollection()->action(QLatin1String("short view")));
- optionsMenu->addAction(m_dirOperator->actionCollection()->action(QLatin1String("detailed view")));
- optionsMenu->addAction(m_dirOperator->actionCollection()->action(QLatin1String("tree view")));
- optionsMenu->addAction(m_dirOperator->actionCollection()->action(QLatin1String("detailed tree view")));
+ optionsMenu->addAction(m_dirOperator->actionCollection()->action(QStringLiteral("short view")));
+ optionsMenu->addAction(m_dirOperator->actionCollection()->action(QStringLiteral("detailed view")));
+ optionsMenu->addAction(m_dirOperator->actionCollection()->action(QStringLiteral("tree view")));
+ optionsMenu->addAction(m_dirOperator->actionCollection()->action(QStringLiteral("detailed tree view")));
optionsMenu->addSeparator();
- optionsMenu->addAction(m_dirOperator->actionCollection()->action(QLatin1String("show hidden")));
+ optionsMenu->addAction(m_dirOperator->actionCollection()->action(QStringLiteral("show hidden")));
// action for synchronising the dir operator with the current document path
m_autoSyncFolder = new QAction(this);
m_autoSyncFolder->setCheckable(true);
m_autoSyncFolder->setText(i18n("Automatically synchronize with current document"));
- m_autoSyncFolder->setIcon(QIcon::fromTheme(QLatin1String("system-switch-user")));
+ m_autoSyncFolder->setIcon(QIcon::fromTheme(QStringLiteral("system-switch-user")));
connect(m_autoSyncFolder, SIGNAL(triggered()), this, SLOT(autoSyncFolder()));
optionsMenu->addAction(m_autoSyncFolder);
- m_actionCollection->addAction(QLatin1String("configure"), optionsMenu);
+ m_actionCollection->addAction(QStringLiteral("configure"), optionsMenu);
//
// Remove all shortcuts due to shortcut clashes (e.g. F5: reload, Ctrl+B: bookmark)
diff --git a/addons/kate/filebrowser/katefilebrowserconfig.cpp b/addons/kate/filebrowser/katefilebrowserconfig.cpp
index 58b0f2a..4d3a4fc 100644
--- a/addons/kate/filebrowser/katefilebrowserconfig.cpp
+++ b/addons/kate/filebrowser/katefilebrowserconfig.cpp
@@ -104,7 +104,7 @@ void KateFileBrowserConfigPage::apply()
KConfigGroup config(KSharedConfig::openConfig(), "filebrowser");
QStringList l;
ActionLBItem *aItem;
- QList<QListWidgetItem *> list = acSel->selectedListWidget()->findItems(QLatin1String("*"), Qt::MatchWildcard);
+ QList<QListWidgetItem *> list = acSel->selectedListWidget()->findItems(QStringLiteral("*"), Qt::MatchWildcard);
foreach(QListWidgetItem *item, list)
{
aItem = static_cast<ActionLBItem*>(item);
@@ -128,24 +128,24 @@ void KateFileBrowserConfigPage::init()
// toolbar
QStringList l = config.readEntry( "toolbar actions", QStringList() );
if ( l.isEmpty() ) // default toolbar
- l << QLatin1String("back") << QLatin1String("forward") << QLatin1String("bookmarks") << QLatin1String("sync_dir") << QLatin1String("configure");
+ l << QStringLiteral("back") << QStringLiteral("forward") << QStringLiteral("bookmarks") << QStringLiteral("sync_dir") << QStringLiteral("configure");
// actions from diroperator + two of our own
QStringList allActions;
- allActions << QLatin1String("up") << QLatin1String("back") << QLatin1String("forward") << QLatin1String("home")
- << QLatin1String("reload") << QLatin1String("mkdir") << QLatin1String("delete")
- << QLatin1String("short view") << QLatin1String("detailed view")
- << QLatin1String("tree view") << QLatin1String("detailed tree view")
- << QLatin1String("show hidden") /*<< QLatin1String("view menu") << QLatin1String("properties")*/
- << QLatin1String("bookmarks") << QLatin1String("sync_dir") << QLatin1String("configure");
- QRegExp re(QLatin1String ("&(?=[^&])"));
+ allActions << QStringLiteral("up") << QStringLiteral("back") << QStringLiteral("forward") << QStringLiteral("home")
+ << QStringLiteral("reload") << QStringLiteral("mkdir") << QStringLiteral("delete")
+ << QStringLiteral("short view") << QStringLiteral("detailed view")
+ << QStringLiteral("tree view") << QStringLiteral("detailed tree view")
+ << QStringLiteral("show hidden") /*<< QStringLiteral("view menu") << QStringLiteral("properties")*/
+ << QStringLiteral("bookmarks") << QStringLiteral("sync_dir") << QStringLiteral("configure");
+ QRegExp re(QStringLiteral ("&(?=[^&])"));
QAction *ac = 0;
QListWidget *lb;
for ( QStringList::Iterator it = allActions.begin(); it != allActions.end(); ++it )
{
lb = l.contains( *it ) ? acSel->selectedListWidget() : acSel->availableListWidget();
- if ( *it == QLatin1String ("bookmarks") || *it == QLatin1String ("sync_dir") || *it == QLatin1String ("configure") )
+ if ( *it == QStringLiteral ("bookmarks") || *it == QStringLiteral ("sync_dir") || *it == QStringLiteral ("configure") )
ac = fileBrowser->actionCollection()->action( *it );
else
ac = fileBrowser->dirOperator()->actionCollection()->action( *it );
diff --git a/addons/kate/filebrowser/katefilebrowserplugin.cpp b/addons/kate/filebrowser/katefilebrowserplugin.cpp
index a35be51..54d265e 100644
--- a/addons/kate/filebrowser/katefilebrowserplugin.cpp
+++ b/addons/kate/filebrowser/katefilebrowserplugin.cpp
@@ -84,7 +84,7 @@ QString KateFileBrowserPlugin::configPageFullName (int number) const
QIcon KateFileBrowserPlugin::configPageIcon (int number) const
{
if (number != 0) return QIcon();
- return QIcon::fromTheme(QLatin1String("document-open"));
+ return QIcon::fromTheme(QStringLiteral("document-open"));
}
//END KateFileBrowserPlugin
@@ -95,9 +95,9 @@ KateFileBrowserPluginView::KateFileBrowserPluginView (KTextEditor::Plugin *plugi
: QObject (mainWindow)
, m_toolView(
mainWindow->createToolView(plugin,
- QLatin1String ("kate_private_plugin_katefileselectorplugin")
+ QStringLiteral ("kate_private_plugin_katefileselectorplugin")
, KTextEditor::MainWindow::Left
- , QIcon::fromTheme(QLatin1String("document-open"))
+ , QIcon::fromTheme(QStringLiteral("document-open"))
, i18n("Filesystem Browser")
)
)
diff --git a/addons/kate/konsole/kateconsole.cpp b/addons/kate/konsole/kateconsole.cpp
index 3c33263..211c18a 100644
--- a/addons/kate/konsole/kateconsole.cpp
+++ b/addons/kate/konsole/kateconsole.cpp
@@ -57,7 +57,7 @@ KateKonsolePlugin::KateKonsolePlugin( QObject* parent, const QList<QVariant>& ):
KTextEditor::Plugin ( parent )
{
m_previousEditorEnv=qgetenv("EDITOR");
- if (!KAuthorized::authorizeKAction(QLatin1String("shell_access")))
+ if (!KAuthorized::authorizeKAction(QStringLiteral("shell_access")))
{
KMessageBox::sorry(0, i18n ("You do not have enough karma to access a shell or terminal emulation"));
}
@@ -96,7 +96,7 @@ QString KateKonsolePlugin::configPageFullName (int number) const
QIcon KateKonsolePlugin::configPageIcon (int number) const
{
if (number != 0) return QIcon();
- return QIcon::fromTheme(QLatin1String("utilities-terminal"));
+ return QIcon::fromTheme(QStringLiteral("utilities-terminal"));
}
void KateKonsolePlugin::readConfig()
@@ -109,7 +109,7 @@ KateKonsolePluginView::KateKonsolePluginView (KateKonsolePlugin* plugin, KTextEd
: QObject(mainWindow),m_plugin(plugin)
{
// init console
- QWidget *toolview = mainWindow->createToolView (plugin, QLatin1String("kate_private_plugin_katekonsoleplugin"), KTextEditor::MainWindow::Bottom, SmallIcon(QLatin1String("utilities-terminal")), i18n("Terminal"));
+ QWidget *toolview = mainWindow->createToolView (plugin, QStringLiteral("kate_private_plugin_katekonsoleplugin"), KTextEditor::MainWindow::Bottom, SmallIcon(QStringLiteral("utilities-terminal")), i18n("Terminal"));
m_console = new KateConsole(m_plugin, mainWindow, toolview);
// register this view
@@ -139,23 +139,23 @@ KateConsole::KateConsole (KateKonsolePlugin* plugin, KTextEditor::MainWindow *mw
, m_toolView (parent)
, m_plugin(plugin)
{
- KXMLGUIClient::setComponentName (QLatin1String("katekonsole"), i18n ("Kate Terminal"));
- setXMLFile( QLatin1String("ui.rc") );
+ KXMLGUIClient::setComponentName (QStringLiteral("katekonsole"), i18n ("Kate Terminal"));
+ setXMLFile( QStringLiteral("ui.rc") );
// make sure we have a vertical layout
new QVBoxLayout(this);
- QAction* a = actionCollection()->addAction(QLatin1String("katekonsole_tools_pipe_to_terminal"));
- a->setIcon(QIcon::fromTheme(QLatin1String("utilities-terminal")));
+ QAction* a = actionCollection()->addAction(QStringLiteral("katekonsole_tools_pipe_to_terminal"));
+ a->setIcon(QIcon::fromTheme(QStringLiteral("utilities-terminal")));
a->setText(i18nc("@action", "&Pipe to Terminal"));
connect(a, SIGNAL(triggered()), this, SLOT(slotPipeToConsole()));
- a = actionCollection()->addAction(QLatin1String("katekonsole_tools_sync"));
+ a = actionCollection()->addAction(QStringLiteral("katekonsole_tools_sync"));
a->setText(i18nc("@action", "S&ynchronize Terminal with Current Document"));
connect(a, SIGNAL(triggered()), this, SLOT(slotManualSync()));
- a = actionCollection()->addAction(QLatin1String("katekonsole_tools_toggle_focus"));
- a->setIcon(QIcon::fromTheme(QLatin1String("utilities-terminal")));
+ a = actionCollection()->addAction(QStringLiteral("katekonsole_tools_toggle_focus"));
+ a->setIcon(QIcon::fromTheme(QStringLiteral("utilities-terminal")));
a->setText(i18nc("@action", "&Focus Terminal"));
connect(a, SIGNAL(triggered()), this, SLOT(slotToggleFocus()));
@@ -179,7 +179,7 @@ void KateConsole::loadConsoleIfNeeded()
if (!window() || !isVisibleTo(window())) return;
KPluginFactory* factory = 0;
- KService::Ptr service = KService::serviceByDesktopName(QLatin1String("konsolepart"));
+ KService::Ptr service = KService::serviceByDesktopName(QStringLiteral("konsolepart"));
if (service) {
factory = KPluginLoader(service->library()).factory();
}
@@ -241,7 +241,7 @@ void KateConsole::cd (const QString & path)
return;
m_currentPath = path;
- sendInput(QLatin1String("cd ") + KShell::quoteArg(m_currentPath) + QLatin1Char('\n'));
+ sendInput(QStringLiteral("cd ") + KShell::quoteArg(m_currentPath) + QLatin1Char('\n'));
}
void KateConsole::sendInput( const QString& text )
@@ -263,7 +263,7 @@ void KateConsole::slotPipeToConsole ()
(m_mw->window()
, i18n ("Do you really want to pipe the text to the console? This will execute any contained commands with your user rights.")
, i18n ("Pipe to Terminal?")
- , KGuiItem(i18n("Pipe to Terminal")), KStandardGuiItem::cancel(), QLatin1String("Pipe To Terminal Warning")) != KMessageBox::Continue)
+ , KGuiItem(i18n("Pipe to Terminal")), KStandardGuiItem::cancel(), QStringLiteral("Pipe To Terminal Warning")) != KMessageBox::Continue)
return;
KTextEditor::View *v = m_mw->activeView();
@@ -285,7 +285,7 @@ void KateConsole::slotSync(KTextEditor::View *)
QFileInfo fi(u.toLocalFile());
cd(fi.absoluteFilePath() );
} else if ( !u.isEmpty() ) {
- sendInput( QLatin1String("### ") + i18n("Sorry, cannot cd into '%1'", u.toLocalFile() ) + QLatin1Char('\n') );
+ sendInput( QStringLiteral("### ") + i18n("Sorry, cannot cd into '%1'", u.toLocalFile() ) + QLatin1Char('\n') );
}
}
}
@@ -299,7 +299,7 @@ void KateConsole::slotManualSync()
}
void KateConsole::slotToggleFocus()
{
- QAction *action = actionCollection()->action(QLatin1String("katekonsole_tools_toggle_focus"));
+ QAction *action = actionCollection()->action(QStringLiteral("katekonsole_tools_toggle_focus"));
if ( ! m_part ) {
m_mw->showToolView( parentWidget() );
action->setText( i18n("Defocus Terminal") );
diff --git a/addons/kate/openheader/plugin_kateopenheader.cpp b/addons/kate/openheader/plugin_kateopenheader.cpp
index f452eea..35647b9 100644
--- a/addons/kate/openheader/plugin_kateopenheader.cpp
+++ b/addons/kate/openheader/plugin_kateopenheader.cpp
@@ -49,9 +49,9 @@ PluginViewKateOpenHeader::PluginViewKateOpenHeader(PluginKateOpenHeader *plugin,
, m_plugin(plugin)
, m_mainWindow(mainwindow)
{
- KXMLGUIClient::setComponentName (QLatin1String("kateopenheaderplugin"), i18n ("Open Header"));
- setXMLFile( QLatin1String("ui.rc") );
- QAction *a = actionCollection()->addAction(QLatin1String("file_openheader"));
+ KXMLGUIClient::setComponentName (QStringLiteral("kateopenheaderplugin"), i18n ("Open Header"));
+ setXMLFile( QStringLiteral("ui.rc") );
+ QAction *a = actionCollection()->addAction(QStringLiteral("file_openheader"));
a->setText(i18n("Open .h/.cpp/.c"));
a->setShortcut( Qt::Key_F12 );
connect( a, SIGNAL(triggered(bool)), plugin, SLOT(slotOpenHeader()) );
@@ -110,8 +110,8 @@ void PluginKateOpenHeader::slotOpenHeader ()
QFileInfo info( url.path() );
QString extension = info.suffix().toLower();
- QStringList headers( QStringList() << QLatin1String("h") << QLatin1String("H") << QLatin1String("hh") << QLatin1String("hpp") );
- QStringList sources( QStringList() << QLatin1String("c") << QLatin1String("cpp") << QLatin1String("cc") << QLatin1String("cp") << QLatin1String("cxx") );
+ QStringList headers( QStringList() << QStringLiteral("h") << QStringLiteral("H") << QStringLiteral("hh") << QStringLiteral("hpp") );
+ QStringList sources( QStringList() << QStringLiteral("c") << QStringLiteral("cpp") << QStringLiteral("cc") << QStringLiteral("cp") << QStringLiteral("cxx") );
if( sources.contains( extension ) ) {
tryOpen( url, headers );
@@ -126,18 +126,18 @@ void PluginKateOpenHeader::tryOpen( const QUrl& url, const QStringList& extensio
if (!application->activeMainWindow())
return;
- qDebug() << "Trying to open " << url.toString() << " with extensions " << extensions.join(QLatin1String(" "));
+ qDebug() << "Trying to open " << url.toString() << " with extensions " << extensions.join(QStringLiteral(" "));
QString basename = QFileInfo( url.path() ).baseName();
QUrl newURL( url );
for( QStringList::ConstIterator it = extensions.begin(); it != extensions.end(); ++it ) {
- setFileName( &newURL,basename + QLatin1String(".") + *it );
+ setFileName( &newURL,basename + QStringLiteral(".") + *it );
if( fileExists( newURL) ) {
application->activeMainWindow()->openUrl( newURL );
return;
}
- setFileName(&newURL, basename + QLatin1String(".") + (*it).toUpper() );
+ setFileName(&newURL, basename + QStringLiteral(".") + (*it).toUpper() );
if( fileExists( newURL) ) {
application->activeMainWindow()->openUrl( newURL );
return;
@@ -172,7 +172,7 @@ void PluginKateOpenHeader::setFileName(QUrl *url,const QString &_txt)
QString path = url->path();
if (path.isEmpty())
#ifdef Q_OS_WIN
- path = url->isLocalFile() ? QDir::rootPath() : QLatin1String("/");
+ path = url->isLocalFile() ? QDir::rootPath() : QStringLiteral("/");
#else
path = QDir::rootPath();
#endif
@@ -196,7 +196,7 @@ const QStringList& PluginViewKateOpenHeader::cmds()
static QStringList l;
if (l.empty()) {
- l << QLatin1String("toggle-header");
+ l << QStringLiteral("toggle-header");
}
return l;
diff --git a/addons/kate/project/kateproject.cpp b/addons/kate/project/kateproject.cpp
index 266d5b7..2771edf 100644
--- a/addons/kate/project/kateproject.cpp
+++ b/addons/kate/project/kateproject.cpp
@@ -118,14 +118,14 @@ bool KateProject::reload (bool force)
/**
* no name, bad => bail out
*/
- if (globalProject[QLatin1String("name")].toString().isEmpty())
+ if (globalProject[QStringLiteral("name")].toString().isEmpty())
return false;
/**
* support out-of-source project files
*/
- if (!globalProject[QLatin1String("directory")].toString().isEmpty())
- m_baseDir = QFileInfo (globalProject[QLatin1String("directory")].toString()).canonicalFilePath ();
+ if (!globalProject[QStringLiteral("directory")].toString().isEmpty())
+ m_baseDir = QFileInfo (globalProject[QStringLiteral("directory")].toString()).canonicalFilePath ();
/**
* anything changed?
@@ -206,13 +206,13 @@ QFile *KateProject::projectLocalFile (const QString &file) const
/**
* create dir to store local files, else fail
*/
- if (!QDir().mkpath (m_fileName + QLatin1String(".d")))
+ if (!QDir().mkpath (m_fileName + QStringLiteral(".d")))
return 0;
/**
* try to open file read-write
*/
- QFile *readWriteFile = new QFile (m_fileName + QLatin1String(".d") + QDir::separator() + file);
+ QFile *readWriteFile = new QFile (m_fileName + QStringLiteral(".d") + QDir::separator() + file);
if (!readWriteFile->open (QIODevice::ReadWrite)) {
delete readWriteFile;
return 0;
@@ -241,7 +241,7 @@ QTextDocument* KateProject::notesDocument ()
/**
* and load text if possible
*/
- if (QFile *inFile = projectLocalFile (QLatin1String("notes.txt"))) {
+ if (QFile *inFile = projectLocalFile (QStringLiteral("notes.txt"))) {
{
QTextStream inStream (inFile);
inStream.setCodec ("UTF-8");
@@ -267,7 +267,7 @@ void KateProject::saveNotesDocument ()
/**
* try to get file to save to
*/
- if (QFile *outFile = projectLocalFile (QLatin1String("notes.txt"))) {
+ if (QFile *outFile = projectLocalFile (QStringLiteral("notes.txt"))) {
outFile->resize (0);
{
QTextStream outStream (outFile);
diff --git a/addons/kate/project/kateproject.h b/addons/kate/project/kateproject.h
index a0756fa..ee5a709 100644
--- a/addons/kate/project/kateproject.h
+++ b/addons/kate/project/kateproject.h
@@ -150,7 +150,7 @@ class KateProject : public QObject
*/
QString name () const
{
- return m_projectMap[QLatin1String("name")].toString ();
+ return m_projectMap[QStringLiteral("name")].toString ();
}
/**
diff --git a/addons/kate/project/kateprojectcompletion.cpp b/addons/kate/project/kateprojectcompletion.cpp
index 0b963e0..a8576f4 100644
--- a/addons/kate/project/kateprojectcompletion.cpp
+++ b/addons/kate/project/kateprojectcompletion.cpp
@@ -62,7 +62,7 @@ QVariant KateProjectCompletion::data(const QModelIndex& index, int role) const
return m_matches.item ( index.row() )->data (Qt::DisplayRole);
if( index.column() == KTextEditor::CodeCompletionModel::Icon && role == Qt::DecorationRole ) {
- static QIcon icon(QIcon::fromTheme(QLatin1String("insert-text")).pixmap(QSize(16, 16)));
+ static QIcon icon(QIcon::fromTheme(QStringLiteral("insert-text")).pixmap(QSize(16, 16)));
return icon;
}
diff --git a/addons/kate/project/kateprojectindex.cpp b/addons/kate/project/kateprojectindex.cpp
index 02f2cc1..f6b4945 100644
--- a/addons/kate/project/kateprojectindex.cpp
+++ b/addons/kate/project/kateprojectindex.cpp
@@ -29,7 +29,7 @@
#include "ctags/readtags.c"
KateProjectIndex::KateProjectIndex (const QStringList &files)
- : m_ctagsIndexFile (QDir::tempPath () + QLatin1String("/kate.project.ctags"))
+ : m_ctagsIndexFile (QDir::tempPath () + QStringLiteral("/kate.project.ctags"))
, m_ctagsIndexHandle (0)
{
/**
@@ -69,15 +69,15 @@ void KateProjectIndex::loadCtags (const QStringList &files)
*/
QProcess ctags;
QStringList args;
- args << QLatin1String("-L") << QLatin1String("-") << QLatin1String("-f") << m_ctagsIndexFile.fileName() << QLatin1String("--fields=+K+n");
- ctags.start(QLatin1String("ctags"), args);
+ args << QStringLiteral("-L") << QStringLiteral("-") << QStringLiteral("-f") << m_ctagsIndexFile.fileName() << QStringLiteral("--fields=+K+n");
+ ctags.start(QStringLiteral("ctags"), args);
if (!ctags.waitForStarted())
return;
/**
* write files list and close write channel
*/
- ctags.write(files.join(QLatin1String("\n")).toLocal8Bit());
+ ctags.write(files.join(QStringLiteral("\n")).toLocal8Bit());
ctags.closeWriteChannel();
/**
diff --git a/addons/kate/project/kateprojectinfoviewcodeanalysis.cpp b/addons/kate/project/kateprojectinfoviewcodeanalysis.cpp
index f46cf9b..905b07d 100644
--- a/addons/kate/project/kateprojectinfoviewcodeanalysis.cpp
+++ b/addons/kate/project/kateprojectinfoviewcodeanalysis.cpp
@@ -45,7 +45,7 @@ KateProjectInfoViewCodeAnalysis::KateProjectInfoViewCodeAnalysis (KateProjectPlu
m_treeView->setEditTriggers (QAbstractItemView::NoEditTriggers);
m_treeView->setUniformRowHeights (true);
m_treeView->setRootIsDecorated (false);
- m_model->setHorizontalHeaderLabels (QStringList () << QLatin1String("File") << QLatin1String("Line") << QLatin1String("Severity") << QLatin1String("Message"));
+ m_model->setHorizontalHeaderLabels (QStringList () << QStringLiteral("File") << QStringLiteral("Line") << QStringLiteral("Severity") << QStringLiteral("Message"));
/**
* attach model
@@ -84,7 +84,7 @@ void KateProjectInfoViewCodeAnalysis::slotStartStopClicked ()
/**
* get files for cppcheck
*/
- QStringList files = m_project->files ().filter (QRegExp (QLatin1String("\\.(cpp|cxx|cc|c\\+\\+|c|tpp|txx)$")));
+ QStringList files = m_project->files ().filter (QRegExp (QStringLiteral("\\.(cpp|cxx|cc|c\\+\\+|c|tpp|txx)$")));
/**
* clear existing entries
@@ -100,8 +100,8 @@ void KateProjectInfoViewCodeAnalysis::slotStartStopClicked ()
connect (m_analyzer, SIGNAL(readyRead()), this, SLOT(slotReadyRead()));
QStringList args;
- args << QLatin1String("-q") << QLatin1String("--inline-suppr") << QLatin1String("--enable=all") << QLatin1String("--template={file}////{line}////{severity}////{message}") << QLatin1String("--file-list=-");
- m_analyzer->start(QLatin1String("cppcheck"), args);
+ args << QStringLiteral("-q") << QStringLiteral("--inline-suppr") << QStringLiteral("--enable=all") << QStringLiteral("--template={file}////{line}////{severity}////{message}") << QStringLiteral("--file-list=-");
+ m_analyzer->start(QStringLiteral("cppcheck"), args);
if (m_messageWidget) {
delete m_messageWidget;
@@ -121,7 +121,7 @@ void KateProjectInfoViewCodeAnalysis::slotStartStopClicked ()
/**
* write files list and close write channel
*/
- m_analyzer->write(files.join(QLatin1String("\n")).toLocal8Bit());
+ m_analyzer->write(files.join(QStringLiteral("\n")).toLocal8Bit());
m_analyzer->closeWriteChannel();
}
@@ -135,7 +135,7 @@ void KateProjectInfoViewCodeAnalysis::slotReadyRead ()
* get one line, split it, skip it, if too few elements
*/
QString line = QString::fromLocal8Bit (m_analyzer->readLine());
- QStringList elements = line.split (QRegExp(QLatin1String("////")), QString::SkipEmptyParts);
+ QStringList elements = line.split (QRegExp(QStringLiteral("////")), QString::SkipEmptyParts);
if (elements.size() < 4)
continue;
diff --git a/addons/kate/project/kateprojectinfoviewterminal.cpp b/addons/kate/project/kateprojectinfoviewterminal.cpp
index 07cbdcd..3b640a0 100644
--- a/addons/kate/project/kateprojectinfoviewterminal.cpp
+++ b/addons/kate/project/kateprojectinfoviewterminal.cpp
@@ -63,7 +63,7 @@ void KateProjectInfoViewTerminal::loadTerminal ()
/**
* get konsole part service
*/
- KService::Ptr service = KService::serviceByDesktopName(QLatin1String("konsolepart"));
+ KService::Ptr service = KService::serviceByDesktopName(QStringLiteral("konsolepart"));
if (!service)
return;
diff --git a/addons/kate/project/kateprojectitem.cpp b/addons/kate/project/kateprojectitem.cpp
index 5337d76..4532230 100644
--- a/addons/kate/project/kateprojectitem.cpp
+++ b/addons/kate/project/kateprojectitem.cpp
@@ -59,9 +59,9 @@ void KateProjectItem::slotModifiedChanged(KTextEditor::Document *doc)
if (m_emblem) {
QStringList emblems;
emblems << *m_emblem;
- m_icon = new QIcon (KIconLoader::global ()->loadIcon (QLatin1String("document-save") , KIconLoader::Small, 0, KIconLoader::DefaultState, emblems));
+ m_icon = new QIcon (KIconLoader::global ()->loadIcon (QStringLiteral("document-save") , KIconLoader::Small, 0, KIconLoader::DefaultState, emblems));
} else {
- m_icon = new QIcon (KIconLoader::global ()->loadIcon (QLatin1String("document-save"), KIconLoader::Small));
+ m_icon = new QIcon (KIconLoader::global ()->loadIcon (QStringLiteral("document-save"), KIconLoader::Small));
}
}
emitDataChanged();
@@ -84,7 +84,7 @@ void KateProjectItem::slotModifiedOnDisk (KTextEditor::Document *document,
}
if (reason != KTextEditor::ModificationInterface::OnDiskUnmodified) {
- m_emblem = new QString(QLatin1String("emblem-important"));
+ m_emblem = new QString(QStringLiteral("emblem-important"));
}
emitDataChanged();
}
@@ -111,11 +111,11 @@ QVariant KateProjectItem::data (int role) const
*/
switch (m_type) {
case Project:
- m_icon = new QIcon (KIconLoader::global ()->loadIcon (QLatin1String("folder-documents"), KIconLoader::Small));
+ m_icon = new QIcon (KIconLoader::global ()->loadIcon (QStringLiteral("folder-documents"), KIconLoader::Small));
break;
case Directory:
- m_icon = new QIcon (KIconLoader::global ()->loadIcon (QLatin1String("folder"), KIconLoader::Small));
+ m_icon = new QIcon (KIconLoader::global ()->loadIcon (QStringLiteral("folder"), KIconLoader::Small));
break;
case File: {
diff --git a/addons/kate/project/kateprojectplugin.cpp b/addons/kate/project/kateprojectplugin.cpp
index a61533e..bba21bb 100644
--- a/addons/kate/project/kateprojectplugin.cpp
+++ b/addons/kate/project/kateprojectplugin.cpp
@@ -151,14 +151,14 @@ KateProject *KateProjectPlugin::projectForDir (QDir dir)
* check for project and load it if found
*/
QString canonicalPath = dir.canonicalPath();
- QString canonicalFileName = canonicalPath + QLatin1String("/.kateproject");
+ QString canonicalFileName = canonicalPath + QStringLiteral("/.kateproject");
foreach (KateProject *project, m_projects) {
if (project->baseDir() == canonicalPath || project->fileName() == canonicalFileName)
return project;
}
- if (dir.exists (QLatin1String(".kateproject")))
+ if (dir.exists (QStringLiteral(".kateproject")))
return createProjectForFileName (canonicalFileName);
/**
@@ -250,7 +250,7 @@ void KateProjectPlugin::slotDirectoryChanged (const QString &path)
/**
* auto-reload, if there
*/
- QString fileName = path + QLatin1String("/.kateproject");
+ QString fileName = path + QStringLiteral("/.kateproject");
foreach (KateProject *project, m_projects) {
if (project->fileName() == fileName) {
project->reload();
diff --git a/addons/kate/project/kateprojectpluginview.cpp b/addons/kate/project/kateprojectpluginview.cpp
index 970c759..10de289 100644
--- a/addons/kate/project/kateprojectpluginview.cpp
+++ b/addons/kate/project/kateprojectpluginview.cpp
@@ -46,21 +46,21 @@ KateProjectPluginView::KateProjectPluginView( KateProjectPlugin *plugin, KTextEd
, m_plugin (plugin)
, m_mainWindow (mainWin)
{
- KXMLGUIClient::setComponentName (QLatin1String("kateproject"), i18n ("Kate Project Manager"));
- setXMLFile( QLatin1String("ui.rc") );
+ KXMLGUIClient::setComponentName (QStringLiteral("kateproject"), i18n ("Kate Project Manager"));
+ setXMLFile( QStringLiteral("ui.rc") );
/**
* create toolviews
*/
- m_toolView = m_mainWindow->createToolView (m_plugin, QLatin1String("kateproject"), KTextEditor::MainWindow::Left, SmallIcon(QLatin1String("project-open")), i18n("Projects"));
- m_toolInfoView = m_mainWindow->createToolView (m_plugin, QLatin1String("kateprojectinfo"), KTextEditor::MainWindow::Bottom, SmallIcon(QLatin1String("view-choose")), i18n("Current Project"));
+ m_toolView = m_mainWindow->createToolView (m_plugin, QStringLiteral("kateproject"), KTextEditor::MainWindow::Left, SmallIcon(QStringLiteral("project-open")), i18n("Projects"));
+ m_toolInfoView = m_mainWindow->createToolView (m_plugin, QStringLiteral("kateprojectinfo"), KTextEditor::MainWindow::Bottom, SmallIcon(QStringLiteral("view-choose")), i18n("Current Project"));
/**
* create the combo + buttons for the toolViews + stacked widgets
*/
m_projectsCombo = new QComboBox (m_toolView);
m_reloadButton = new QToolButton (m_toolView);
- m_reloadButton->setIcon (SmallIcon(QLatin1String("view-refresh")));
+ m_reloadButton->setIcon (SmallIcon(QStringLiteral("view-refresh")));
QHBoxLayout *layout = new QHBoxLayout ();
layout->setSpacing (0);
layout->addWidget (m_projectsCombo);
@@ -99,8 +99,8 @@ KateProjectPluginView::KateProjectPluginView( KateProjectPlugin *plugin, KTextEd
/**
* back + forward
*/
- actionCollection()->addAction (KStandardAction::Back, QLatin1String("projects_prev_project"), this, SLOT(slotProjectPrev()))->setShortcut (Qt::CTRL | Qt::ALT | Qt::Key_Left);
- actionCollection()->addAction (KStandardAction::Forward, QLatin1String("projects_next_project"), this, SLOT(slotProjectNext()))->setShortcut (Qt::CTRL | Qt::ALT | Qt::Key_Right);
+ actionCollection()->addAction (KStandardAction::Back, QStringLiteral("projects_prev_project"), this, SLOT(slotProjectPrev()))->setShortcut (Qt::CTRL | Qt::ALT | Qt::Key_Left);
+ actionCollection()->addAction (KStandardAction::Forward, QStringLiteral("projects_next_project"), this, SLOT(slotProjectNext()))->setShortcut (Qt::CTRL | Qt::ALT | Qt::Key_Right);
/**
* add us to gui
@@ -156,7 +156,7 @@ QPair<KateProjectView *,KateProjectInfoView *> KateProjectPluginView::viewForPro
*/
m_stackedProjectViews->addWidget (view);
m_stackedProjectInfoViews->addWidget (infoView);
- m_projectsCombo->addItem (SmallIcon(QLatin1String("project-open")), project->name(), project->fileName());
+ m_projectsCombo->addItem (SmallIcon(QStringLiteral("project-open")), project->name(), project->fileName());
/**
* remember and return it
diff --git a/addons/kate/project/kateprojecttreeviewcontextmenu.cpp b/addons/kate/project/kateprojecttreeviewcontextmenu.cpp
index 9fdd641..5a99662 100644
--- a/addons/kate/project/kateprojecttreeviewcontextmenu.cpp
+++ b/addons/kate/project/kateprojecttreeviewcontextmenu.cpp
@@ -49,11 +49,11 @@ static bool isGit(const QString& filename)
QProcess git;
git.setWorkingDirectory (dir.absolutePath());
QStringList args;
- args << QLatin1String("ls-files") << fi.fileName();
- git.start(QLatin1String("git"), args);
+ args << QStringLiteral("ls-files") << fi.fileName();
+ git.start(QStringLiteral("git"), args);
bool isGit = false;
if (git.waitForStarted() && git.waitForFinished()) {
- QStringList files = QString::fromLocal8Bit (git.readAllStandardOutput ()).split (QRegExp(QLatin1String("[\n\r]")), QString::SkipEmptyParts);
+ QStringList files = QString::fromLocal8Bit (git.readAllStandardOutput ()).split (QRegExp(QStringLiteral("[\n\r]")), QString::SkipEmptyParts);
isGit = files.contains(fi.fileName());
}
return isGit;
@@ -82,7 +82,7 @@ void KateProjectTreeViewContextMenu::exec(const QString& filename, const QPoint&
*/
QMenu menu;
- QAction *copyAction = menu.addAction(QIcon::fromTheme(QLatin1String("edit-copy")), i18n("Copy Filename"));
+ QAction *copyAction = menu.addAction(QIcon::fromTheme(QStringLiteral("edit-copy")), i18n("Copy Filename"));
/**
* handle "open with"
@@ -90,7 +90,7 @@ void KateProjectTreeViewContextMenu::exec(const QString& filename, const QPoint&
*/
QMenu *openWithMenu = menu.addMenu(i18n("Open With"));
QMimeType mimeType = QMimeDatabase().mimeTypeForFile(filename);
- KService::List offers = KMimeTypeTrader::self()->query(mimeType.name(), QLatin1String("Application"));
+ KService::List offers = KMimeTypeTrader::self()->query(mimeType.name(), QStringLiteral("Application"));
/**
* for each one, insert a menu item...
@@ -98,7 +98,7 @@ void KateProjectTreeViewContextMenu::exec(const QString& filename, const QPoint&
for(KService::List::Iterator it = offers.begin(); it != offers.end(); ++it)
{
KService::Ptr service = *it;
- if (service->name() == QLatin1String("Kate")) continue; // omit Kate
+ if (service->name() == QStringLiteral("Kate")) continue; // omit Kate
QAction *action = openWithMenu->addAction(QIcon::fromTheme(service->icon()), service->name());
action->setData(service->entryPath());
}
@@ -111,19 +111,19 @@ void KateProjectTreeViewContextMenu::exec(const QString& filename, const QPoint&
QList<QAction*> appActions;
if (isGit(filename)) {
QMenu* git = menu.addMenu(i18n("Git Tools"));
- if (appExists(QLatin1String("gitk"))) {
+ if (appExists(QStringLiteral("gitk"))) {
QAction* action = git->addAction(i18n("Launch gitk"));
- action->setData(QLatin1String("gitk"));
+ action->setData(QStringLiteral("gitk"));
appActions.append(action);
}
- if (appExists(QLatin1String("qgit"))) {
+ if (appExists(QStringLiteral("qgit"))) {
QAction* action = git->addAction(i18n("Launch qgit"));
- action->setData(QLatin1String("qgit"));
+ action->setData(QStringLiteral("qgit"));
appActions.append(action);
}
- if (appExists(QLatin1String("git-cola"))) {
+ if (appExists(QStringLiteral("git-cola"))) {
QAction* action = git->addAction(i18n("Launch git-cola"));
- action->setData(QLatin1String("git-cola"));
+ action->setData(QStringLiteral("git-cola"));
appActions.append(action);
}
diff --git a/addons/kate/project/kateprojectworker.cpp b/addons/kate/project/kateprojectworker.cpp
index f337111..72f2a43 100644
--- a/addons/kate/project/kateprojectworker.cpp
+++ b/addons/kate/project/kateprojectworker.cpp
@@ -77,19 +77,19 @@ void KateProjectWorker::loadProject (QStandardItem *parent, const QVariantMap &p
/**
* recurse to sub-projects FIRST
*/
- QVariantList subGroups = project[QLatin1String("projects")].toList ();
+ QVariantList subGroups = project[QStringLiteral("projects")].toList ();
foreach (const QVariant &subGroupVariant, subGroups) {
/**
* convert to map and get name, else skip
*/
QVariantMap subProject = subGroupVariant.toMap ();
- if (subProject[QLatin1String("name")].toString().isEmpty())
+ if (subProject[QStringLiteral("name")].toString().isEmpty())
continue;
/**
* recurse
*/
- QStandardItem *subProjectItem = new KateProjectItem (KateProjectItem::Project, subProject[QLatin1String("name")].toString());
+ QStandardItem *subProjectItem = new KateProjectItem (KateProjectItem::Project, subProject[QStringLiteral("name")].toString());
loadProject (subProjectItem, subProject, file2Item);
parent->appendRow (subProjectItem);
}
@@ -97,7 +97,7 @@ void KateProjectWorker::loadProject (QStandardItem *parent, const QVariantMap &p
/**
* load all specified files
*/
- QVariantList files = project[QLatin1String("files")].toList ();
+ QVariantList files = project[QStringLiteral("files")].toList ();
foreach (const QVariant &fileVariant, files)
loadFilesEntry (parent, fileVariant.toMap (), file2Item);
}
@@ -113,7 +113,7 @@ static QStandardItem *directoryParent (QMap<QString, QStandardItem *> &dir2Item,
/**
* throw away simple /
*/
- if (path == QLatin1String("/"))
+ if (path == QStringLiteral("/"))
path = QString();
/**
@@ -163,13 +163,13 @@ void KateProjectWorker::loadFilesEntry (QStandardItem *parent, const QVariantMap
* get directory to open or skip
*/
QDir dir (m_baseDir);
- if (!dir.cd (filesEntry[QLatin1String("directory")].toString()))
+ if (!dir.cd (filesEntry[QStringLiteral("directory")].toString()))
return;
/**
* get recursive attribute, default is TRUE
*/
- const bool recursive = !filesEntry.contains (QLatin1String("recursive")) || filesEntry[QLatin1String("recursive")].toBool();
+ const bool recursive = !filesEntry.contains (QStringLiteral("recursive")) || filesEntry[QStringLiteral("recursive")].toBool();
/**
* now: choose between different methodes to get files in the directory
@@ -179,22 +179,22 @@ void KateProjectWorker::loadFilesEntry (QStandardItem *parent, const QVariantMap
/**
* use GIT
*/
- if (filesEntry[QLatin1String("git")].toBool()) {
+ if (filesEntry[QStringLiteral("git")].toBool()) {
/**
* try to run git with ls-files for this directory
*/
QProcess git;
git.setWorkingDirectory (dir.absolutePath());
QStringList args;
- args << QLatin1String("ls-files") << QLatin1String(".");
- git.start(QLatin1String("git"), args);
+ args << QStringLiteral("ls-files") << QStringLiteral(".");
+ git.start(QStringLiteral("git"), args);
if (!git.waitForStarted() || !git.waitForFinished())
return;
/**
* get output and split up into files
*/
- QStringList relFiles = QString::fromLocal8Bit (git.readAllStandardOutput ()).split (QRegExp(QLatin1String("[\n\r]")), QString::SkipEmptyParts);
+ QStringList relFiles = QString::fromLocal8Bit (git.readAllStandardOutput ()).split (QRegExp(QStringLiteral("[\n\r]")), QString::SkipEmptyParts);
/**
* prepend the directory path
@@ -203,7 +203,7 @@ void KateProjectWorker::loadFilesEntry (QStandardItem *parent, const QVariantMap
/**
* skip non-direct files if not recursive
*/
- if (!recursive && (relFile.indexOf (QLatin1String("/")) != -1))
+ if (!recursive && (relFile.indexOf (QStringLiteral("/")) != -1))
continue;
files.append (dir.absolutePath() + QLatin1Char('/') + relFile);
@@ -213,22 +213,22 @@ void KateProjectWorker::loadFilesEntry (QStandardItem *parent, const QVariantMap
/**
* use MERCURIAL
*/
- else if (filesEntry[QLatin1String("hg")].toBool()) {
+ else if (filesEntry[QStringLiteral("hg")].toBool()) {
/**
- * try to run QLatin1String("hg manifest") for this directory
+ * try to run QStringLiteral("hg manifest") for this directory
*/
QProcess hg;
hg.setWorkingDirectory (dir.absolutePath());
QStringList args;
- args << QLatin1String("manifest") << QLatin1String(".");
- hg.start(QLatin1String("hg"), args);
+ args << QStringLiteral("manifest") << QStringLiteral(".");
+ hg.start(QStringLiteral("hg"), args);
if (!hg.waitForStarted() || !hg.waitForFinished())
return;
/**
* get output and split up into files
*/
- QStringList relFiles = QString::fromLocal8Bit (hg.readAllStandardOutput ()).split (QRegExp(QLatin1String("[\n\r]")), QString::SkipEmptyParts);
+ QStringList relFiles = QString::fromLocal8Bit (hg.readAllStandardOutput ()).split (QRegExp(QStringLiteral("[\n\r]")), QString::SkipEmptyParts);
/**
* prepend the directory path
@@ -237,7 +237,7 @@ void KateProjectWorker::loadFilesEntry (QStandardItem *parent, const QVariantMap
/**
* skip non-direct files if not recursive
*/
- if (!recursive && (relFile.indexOf (QLatin1String("/")) != -1))
+ if (!recursive && (relFile.indexOf (QStringLiteral("/")) != -1))
continue;
files.append (dir.absolutePath() + QLatin1Char('/') + relFile);
@@ -247,26 +247,26 @@ void KateProjectWorker::loadFilesEntry (QStandardItem *parent, const QVariantMap
/**
* use SVN
*/
- else if (filesEntry[QLatin1String("svn")].toBool()) {
+ else if (filesEntry[QStringLiteral("svn")].toBool()) {
/**
* try to run git with ls-files for this directory
*/
QProcess svn;
svn.setWorkingDirectory (dir.absolutePath());
QStringList args;
- args << QLatin1String("status") << QLatin1String("--verbose") << QLatin1String(".");
+ args << QStringLiteral("status") << QStringLiteral("--verbose") << QStringLiteral(".");
if (recursive)
- args << QLatin1String("--depth=infinity");
+ args << QStringLiteral("--depth=infinity");
else
- args << QLatin1String("--depth=files");
- svn.start(QLatin1String("svn"), args);
+ args << QStringLiteral("--depth=files");
+ svn.start(QStringLiteral("svn"), args);
if (!svn.waitForStarted() || !svn.waitForFinished())
return;
/**
* get output and split up into lines
*/
- QStringList lines = QString::fromLocal8Bit (svn.readAllStandardOutput ()).split (QRegExp(QLatin1String("[\n\r]")), QString::SkipEmptyParts);
+ QStringList lines = QString::fromLocal8Bit (svn.readAllStandardOutput ()).split (QRegExp(QStringLiteral("[\n\r]")), QString::SkipEmptyParts);
/**
* remove start of line that is no filename, sort out unknown and ignore
@@ -281,7 +281,7 @@ void KateProjectWorker::loadFilesEntry (QStandardItem *parent, const QVariantMap
/**
* try to find ., else fail
*/
- prefixLength = line.lastIndexOf (QLatin1String("."));
+ prefixLength = line.lastIndexOf (QStringLiteral("."));
if (prefixLength < 0)
break;
@@ -302,7 +302,7 @@ void KateProjectWorker::loadFilesEntry (QStandardItem *parent, const QVariantMap
}
else {
- files = filesEntry[QLatin1String("list")].toStringList();
+ files = filesEntry[QStringLiteral("list")].toStringList();
/**
* fallback to use QDirIterator and search files ourself!
@@ -316,7 +316,7 @@ void KateProjectWorker::loadFilesEntry (QStandardItem *parent, const QVariantMap
/**
* set name filters, if any
*/
- QStringList filters = filesEntry[QLatin1String("filters")].toStringList();
+ QStringList filters = filesEntry[QStringLiteral("filters")].toStringList();
if (!filters.isEmpty())
dir.setNameFilters (filters);
diff --git a/kate/app/kateapp.cpp b/kate/app/kateapp.cpp
index e7d8e27..f4010c4 100644
--- a/kate/app/kateapp.cpp
+++ b/kate/app/kateapp.cpp
@@ -79,7 +79,7 @@ KateApp::~KateApp ()
{
// unregister...
m_adaptor->emitExiting ();
- QDBusConnection::sessionBus().unregisterObject( QLatin1String("/MainApplication") );
+ QDBusConnection::sessionBus().unregisterObject( QStringLiteral("/MainApplication") );
delete m_adaptor;
// l8r, app commands
@@ -123,7 +123,7 @@ bool KateApp::init ()
}
// application dbus interface
- QDBusConnection::sessionBus().registerObject( QLatin1String("/MainApplication"), this );
+ QDBusConnection::sessionBus().registerObject( QStringLiteral("/MainApplication"), this );
return true;
}
@@ -153,15 +153,15 @@ void KateApp::restoreKate ()
bool KateApp::startupKate ()
{
// user specified session to open
- if (m_args.isSet (QLatin1String("start")))
+ if (m_args.isSet (QStringLiteral("start")))
{
- sessionManager()->activateSession (m_args.value(QLatin1String("start")), false);
+ sessionManager()->activateSession (m_args.value(QStringLiteral("start")), false);
}
- else if (m_args.isSet(QLatin1String("startanon")))
+ else if (m_args.isSet(QStringLiteral("startanon")))
{
sessionManager()->activateAnonymousSession();
}
- else if (!m_args.isSet( QLatin1String("stdin") ) && (m_args.positionalArguments().count() == 0)) // only start session if no files specified
+ else if (!m_args.isSet( QStringLiteral("stdin") ) && (m_args.positionalArguments().count() == 0)) // only start session if no files specified
{
// let the user choose session if possible
if (!sessionManager()->chooseSession ())
@@ -188,8 +188,8 @@ bool KateApp::startupKate ()
KStartupInfo::setNewStartupId( activeKateMainWindow(), startupId());
#endif
- QTextCodec *codec = m_args.isSet(QLatin1String("encoding")) ? QTextCodec::codecForName(m_args.value(QLatin1String("encoding")).toUtf8()) : 0;
- bool tempfileSet = m_args.isSet(QLatin1String("tempfile"));
+ QTextCodec *codec = m_args.isSet(QStringLiteral("encoding")) ? QTextCodec::codecForName(m_args.value(QStringLiteral("encoding")).toUtf8()) : 0;
+ bool tempfileSet = m_args.isSet(QStringLiteral("tempfile"));
KTextEditor::Document *doc = 0;
const QString codec_name = codec ? QString::fromLatin1(codec->name()) : QString();
@@ -200,7 +200,7 @@ bool KateApp::startupKate ()
QUrl url;
// convert to an url
- QRegExp withProtocol(QLatin1String("^[a-zA-Z]+:")); // TODO: remove after Qt supports this on its own
+ QRegExp withProtocol(QStringLiteral("^[a-zA-Z]+:")); // TODO: remove after Qt supports this on its own
if (withProtocol.indexIn(positionalArgument) == 0) {
url = QUrl::fromUserInput(positionalArgument);
} else {
@@ -222,7 +222,7 @@ bool KateApp::startupKate ()
doc = activeKateMainWindow()->viewManager()->openUrls(urls, codec_name, tempfileSet);
// handle stdin input
- if( m_args.isSet( QLatin1String("stdin") ) )
+ if( m_args.isSet( QStringLiteral("stdin") ) )
{
QTextStream input(stdin, QIODevice::ReadOnly);
@@ -252,15 +252,15 @@ bool KateApp::startupKate ()
int column = 0;
bool nav = false;
- if (m_args.isSet (QLatin1String("line")))
+ if (m_args.isSet (QStringLiteral("line")))
{
- line = m_args.value (QLatin1String("line")).toInt() - 1;
+ line = m_args.value (QStringLiteral("line")).toInt() - 1;
nav = true;
}
- if (m_args.isSet (QLatin1String("column")))
+ if (m_args.isSet (QStringLiteral("column")))
{
- column = m_args.value (QLatin1String("column")).toInt() - 1;
+ column = m_args.value (QStringLiteral("column")).toInt() - 1;
nav = true;
}
@@ -370,7 +370,7 @@ bool KateApp::openInput (const QString &text)
KateMainWindow *KateApp::newMainWindow (KConfig *sconfig_, const QString &sgroup_)
{
KConfig *sconfig = sconfig_ ? sconfig_ : KSharedConfig::openConfig().data();
- QString sgroup = !sgroup_.isEmpty() ? sgroup_ : QLatin1String("MainWindow0");
+ QString sgroup = !sgroup_.isEmpty() ? sgroup_ : QStringLiteral("MainWindow0");
KateMainWindow *mainWindow = new KateMainWindow (sconfig, sgroup);
mainWindow->show ();
diff --git a/kate/app/kateappadaptor.cpp b/kate/app/kateappadaptor.cpp
index b27c83d..38b29a6 100644
--- a/kate/app/kateappadaptor.cpp
+++ b/kate/app/kateappadaptor.cpp
@@ -62,7 +62,7 @@ bool KateAppAdaptor::openUrl (QString url, QString encoding, bool isTempFile)
QString KateAppAdaptor::tokenOpenUrl (QString url, QString encoding)
{
KTextEditor::Document *doc=m_app->openDocUrl (QUrl(url), encoding, false);
- if (!doc) return QLatin1String("ERROR");
+ if (!doc) return QStringLiteral("ERROR");
return QString::fromLatin1("%1").arg((qptrdiff)doc);
}
@@ -70,7 +70,7 @@ QString KateAppAdaptor::tokenOpenUrl (QString url, QString encoding, bool isTemp
{
qCDebug(LOG_KATE) << "openURL";
KTextEditor::Document *doc=m_app->openDocUrl (QUrl(url), encoding, isTempFile);
- if (!doc) return QLatin1String("ERROR");
+ if (!doc) return QStringLiteral("ERROR");
return QString::fromLatin1("%1").arg((qptrdiff)doc);
}
//--------
diff --git a/kate/app/kateappcommands.cpp b/kate/app/kateappcommands.cpp
index 228abcd..8ed3c8b 100644
--- a/kate/app/kateappcommands.cpp
+++ b/kate/app/kateappcommands.cpp
@@ -39,15 +39,15 @@ KateAppCommands::KateAppCommands()
iface->registerCommand(this);
}
- re_write.setPattern(QLatin1String("w(a)?"));
- re_close.setPattern(QLatin1String("bd(elete)?|tabc(lose)?"));
- re_quit.setPattern(QLatin1String("(w)?q(a|all)?(!)?"));
- re_exit.setPattern(QLatin1String("x(a)?"));
- re_edit.setPattern(QLatin1String("e(dit)?|tabe(dit)?|tabnew"));
- re_new.setPattern(QLatin1String("(v)?new"));
- re_split.setPattern(QLatin1String("sp(lit)?"));
- re_vsplit.setPattern(QLatin1String("vs(plit)?"));
- re_only.setPattern(QLatin1String("on(ly)?"));
+ re_write.setPattern(QStringLiteral("w(a)?"));
+ re_close.setPattern(QStringLiteral("bd(elete)?|tabc(lose)?"));
+ re_quit.setPattern(QStringLiteral("(w)?q(a|all)?(!)?"));
+ re_exit.setPattern(QStringLiteral("x(a)?"));
+ re_edit.setPattern(QStringLiteral("e(dit)?|tabe(dit)?|tabnew"));
+ re_new.setPattern(QStringLiteral("(v)?new"));
+ re_split.setPattern(QStringLiteral("sp(lit)?"));
+ re_vsplit.setPattern(QStringLiteral("vs(plit)?"));
+ re_only.setPattern(QStringLiteral("on(ly)?"));
}
KateAppCommands::~KateAppCommands()
@@ -66,11 +66,11 @@ const QStringList& KateAppCommands::cmds()
static QStringList l;
if (l.empty()) {
- l << QLatin1String("q") << QLatin1String("qa") << QLatin1String("qall") << QLatin1String("q!") << QLatin1String("qa!") << QLatin1String("qall!")
- << QLatin1String("wq") << QLatin1String("wa") << QLatin1String("wqa") << QLatin1String("x") << QLatin1String("xa") << QLatin1String("new")
- << QLatin1String("vnew") << QLatin1String("e") << QLatin1String("edit") << QLatin1String("enew") << QLatin1String("sp") << QLatin1String("split") << QLatin1String("vs")
- << QLatin1String("vsplit") << QLatin1String("only") << QLatin1String("tabe") << QLatin1String("tabedit") << QLatin1String("tabnew") << QLatin1String("bd")
- << QLatin1String("bdelete") << QLatin1String("tabc") << QLatin1String("tabclose");
+ l << QStringLiteral("q") << QStringLiteral("qa") << QStringLiteral("qall") << QStringLiteral("q!") << QStringLiteral("qa!") << QStringLiteral("qall!")
+ << QStringLiteral("wq") << QStringLiteral("wa") << QStringLiteral("wqa") << QStringLiteral("x") << QStringLiteral("xa") << QStringLiteral("new")
+ << QStringLiteral("vnew") << QStringLiteral("e") << QStringLiteral("edit") << QStringLiteral("enew") << QStringLiteral("sp") << QStringLiteral("split") << QStringLiteral("vs")
+ << QStringLiteral("vsplit") << QStringLiteral("only") << QStringLiteral("tabe") << QStringLiteral("tabedit") << QStringLiteral("tabnew") << QStringLiteral("bd")
+ << QStringLiteral("bdelete") << QStringLiteral("tabc") << QStringLiteral("tabclose");
}
return l;
@@ -78,7 +78,7 @@ const QStringList& KateAppCommands::cmds()
bool KateAppCommands::exec(KTextEditor::View *view, const QString &cmd, QString &msg)
{
- QStringList args(cmd.split( QRegExp(QLatin1String("\\s+")), QString::SkipEmptyParts)) ;
+ QStringList args(cmd.split( QRegExp(QStringLiteral("\\s+")), QString::SkipEmptyParts)) ;
QString command( args.takeFirst() );
KateMainWindow *mainWin = KateApp::self()->activeKateMainWindow();
@@ -146,7 +146,7 @@ bool KateAppCommands::exec(KTextEditor::View *view, const QString &cmd, QString
}
else if (re_edit.exactMatch(command)) {
QString argument = args.join(QLatin1Char(' '));
- if (argument.isEmpty() || argument == QLatin1String("!")) {
+ if (argument.isEmpty() || argument == QStringLiteral("!")) {
view->document()->documentReload();
} else {
QUrl base = mainWin->activeDocumentUrl();
@@ -155,7 +155,7 @@ bool KateAppCommands::exec(KTextEditor::View *view, const QString &cmd, QString
if (base.isValid()) { // first try to use the same path as the current open document has
url = QUrl(base.resolved(arg2path)); //resolved handles the case where the args is a relative path, and is the same as using QUrl(args) elsewise
} else { // else use the cwd
- url = QUrl(QUrl(QDir::currentPath() + QLatin1String("/")).resolved(arg2path)); // + "/" is needed because of http://lists.qt.nokia.com/public/qt-interest/2011-May/033913.html
+ url = QUrl(QUrl(QDir::currentPath() + QStringLiteral("/")).resolved(arg2path)); // + "/" is needed because of http://lists.qt.nokia.com/public/qt-interest/2011-May/033913.html
}
QFileInfo file( url.toLocalFile() );
KTextEditor::Document *doc = KateDocManager::self()->findDocument( url );
@@ -169,14 +169,14 @@ bool KateAppCommands::exec(KTextEditor::View *view, const QString &cmd, QString
}
}
else if (re_new.exactMatch(command)) {
- if (re_new.cap(1) == QLatin1String("v")) { // vertical split
+ if (re_new.cap(1) == QStringLiteral("v")) { // vertical split
mainWin->viewManager()->slotSplitViewSpaceVert();
} else { // horizontal split
mainWin->viewManager()->slotSplitViewSpaceHoriz();
}
mainWin->viewManager()->slotDocumentNew();
}
- else if (command == QLatin1String("enew")) {
+ else if (command == QStringLiteral("enew")) {
mainWin->viewManager()->slotDocumentNew();
}
else if (re_split.exactMatch(command)) {
diff --git a/kate/app/kateconfigdialog.cpp b/kate/app/kateconfigdialog.cpp
index bc70494..bf4225a 100644
--- a/kate/app/kateconfigdialog.cpp
+++ b/kate/app/kateconfigdialog.cpp
@@ -54,7 +54,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, KTextEditor::View *
setFaceType( Tree );
setWindowTitle( i18n("Configure") );
setStandardButtons( QDialogButtonBox::Ok | QDialogButtonBox::Apply | QDialogButtonBox::Cancel | QDialogButtonBox::Help );
- setObjectName(QLatin1String("configdialog"));
+ setObjectName(QStringLiteral("configdialog"));
// FIXME KF5 setHelp( QString(), KGlobal::mainComponent().componentName() );
KSharedConfig::Ptr config = KSharedConfig::openConfig();
@@ -63,7 +63,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, KTextEditor::View *
buttonBox()->button(QDialogButtonBox::Apply)->setEnabled(false);
KPageWidgetItem *applicationItem = addPage( new QWidget, i18n("Application") );
- applicationItem->setIcon( QIcon::fromTheme( QLatin1String("preferences-other") ) );
+ applicationItem->setIcon( QIcon::fromTheme( QStringLiteral("preferences-other") ) );
applicationItem->setHeader( i18n("Application Options") );
m_applicationPage = applicationItem;
@@ -71,7 +71,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, KTextEditor::View *
QFrame* generalFrame = new QFrame;
KPageWidgetItem *item = addSubPage( applicationItem, generalFrame, i18n("General") );
item->setHeader( i18n("General Options") );
- item->setIcon( QIcon::fromTheme( QLatin1String("go-home") ) );
+ item->setIcon( QIcon::fromTheme( QStringLiteral("go-home") ) );
setCurrentPage (item);
QVBoxLayout *layout = new QVBoxLayout( generalFrame );
@@ -141,7 +141,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, KTextEditor::View *
QFrame* sessionsFrame = new QFrame;
item = addSubPage( applicationItem, sessionsFrame, i18n("Sessions") );
item->setHeader( i18n("Session Management") );
- item->setIcon( QIcon::fromTheme( QLatin1String("view-history") ) );
+ item->setIcon( QIcon::fromTheme( QStringLiteral("view-history") ) );
layout = new QVBoxLayout( sessionsFrame );
layout->setMargin(0);
@@ -170,9 +170,9 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, KTextEditor::View *
m_manuallyChooseSessionRadioButton = new QRadioButton( i18n("&Manually choose a session"), sessionsStart );
QString sesStart (cgGeneral.readEntry ("Startup Session", "manual"));
- if (sesStart == QLatin1String("new"))
+ if (sesStart == QStringLiteral("new"))
m_startNewSessionRadioButton->setChecked (true);
- else if (sesStart == QLatin1String("last"))
+ else if (sesStart == QStringLiteral("last"))
m_loadLastUserSessionRadioButton->setChecked (true);
else
m_manuallyChooseSessionRadioButton->setChecked (true);
@@ -201,7 +201,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, KTextEditor::View *
item = addSubPage( applicationItem, page, i18n("Plugins") );
item->setHeader( i18n("Plugin Manager") );
- item->setIcon( QIcon::fromTheme( QLatin1String("preferences-plugin") ) );
+ item->setIcon( QIcon::fromTheme( QStringLiteral("preferences-plugin") ) );
KatePluginList &pluginList (KatePluginManager::self()->pluginList());
foreach (const KatePluginInfo &plugin, pluginList)
@@ -214,7 +214,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, KTextEditor::View *
// editor widgets from kwrite/kwdialog
m_editorPage = addPage( new QWidget, i18n("Editor Component") );
- m_editorPage->setIcon( QIcon::fromTheme( QLatin1String("accessories-text-editor") ) );
+ m_editorPage->setIcon( QIcon::fromTheme( QStringLiteral("accessories-text-editor") ) );
m_editorPage->setHeader( i18n("Editor Component Options") );
addEditorPages();
diff --git a/kate/app/katedocmanager.cpp b/kate/app/katedocmanager.cpp
index ff1321d..c7229f0 100644
--- a/kate/app/katedocmanager.cpp
+++ b/kate/app/katedocmanager.cpp
@@ -61,7 +61,7 @@ KateDocManager::KateDocManager (QObject *parent)
// read in editor config
KTextEditor::Editor::instance()->readConfig(KSharedConfig::openConfig().data());
- m_metaInfos = new KConfig(QLatin1String("metainfos"), KConfig::NoGlobals, QStandardPaths::DataLocation );
+ m_metaInfos = new KConfig(QStringLiteral("metainfos"), KConfig::NoGlobals, QStandardPaths::DataLocation );
createDoc ();
}
@@ -701,7 +701,7 @@ void KateDocManager::documentOpened()
disconnect(doc, SIGNAL(canceled(QString)), this, SLOT(documentOpened()));
if (doc->openingError())
{
- m_openingErrors += QLatin1Char('\n') + doc->openingErrorMessage() + QLatin1String("\n\n");
+ m_openingErrors += QLatin1Char('\n') + doc->openingErrorMessage() + QStringLiteral("\n\n");
KateDocumentInfo* info = documentInfo(doc);
if (info) {
info->openSuccess = false;
diff --git a/kate/app/katemainwindow.cpp b/kate/app/katemainwindow.cpp
index ce0b721..f10aec4 100644
--- a/kate/app/katemainwindow.cpp
+++ b/kate/app/katemainwindow.cpp
@@ -164,7 +164,7 @@ KateMainWindow::KateMainWindow (KConfig *sconfig, const QString &sgroup)
setupActions();
setStandardToolBarMenuEnabled( true );
- setXMLFile( QLatin1String("kateui.rc") );
+ setXMLFile( QStringLiteral("kateui.rc") );
createShellGUI ( true );
//qCDebug(LOG_KATE) << "****************************************************************************" << sconfig;
@@ -230,7 +230,7 @@ void KateMainWindow::setupImportantActions ()
m_paShowStatusBar->setWhatsThis(i18n("Use this command to show or hide the view's statusbar"));
m_paShowPath = new KToggleAction( i18n("Sho&w Path in Titlebar"), this );
- actionCollection()->addAction( QLatin1String("settings_show_full_path"), m_paShowPath );
+ actionCollection()->addAction( QStringLiteral("settings_show_full_path"), m_paShowPath );
connect( m_paShowPath, SIGNAL(toggled(bool)), this, SLOT(updateCaption()) );
m_paShowPath->setWhatsThis(i18n("Show the complete document path in the window caption"));
}
@@ -264,58 +264,58 @@ void KateMainWindow::setupActions()
{
QAction *a;
- actionCollection()->addAction( KStandardAction::New, QLatin1String("file_new"), m_viewManager, SLOT(slotDocumentNew()) )
+ actionCollection()->addAction( KStandardAction::New, QStringLiteral("file_new"), m_viewManager, SLOT(slotDocumentNew()) )
->setWhatsThis(i18n("Create a new document"));
- actionCollection()->addAction( KStandardAction::Open, QLatin1String("file_open"), m_viewManager, SLOT(slotDocumentOpen()) )
+ actionCollection()->addAction( KStandardAction::Open, QStringLiteral("file_open"), m_viewManager, SLOT(slotDocumentOpen()) )
->setWhatsThis(i18n("Open an existing document for editing"));
fileOpenRecent = KStandardAction::openRecent (m_viewManager, SLOT(openUrl(QUrl)), this);
actionCollection()->addAction(fileOpenRecent->objectName(), fileOpenRecent);
fileOpenRecent->setWhatsThis(i18n("This lists files which you have opened recently, and allows you to easily open them again."));
- a = actionCollection()->addAction( QLatin1String("file_save_all") );
- a->setIcon( QIcon::fromTheme(QLatin1String("document-save-all")) );
+ a = actionCollection()->addAction( QStringLiteral("file_save_all") );
+ a->setIcon( QIcon::fromTheme(QStringLiteral("document-save-all")) );
a->setText( i18n("Save A&ll") );
a->setShortcut( QKeySequence(Qt::CTRL + Qt::Key_L) );
connect( a, SIGNAL(triggered()), KateDocManager::self(), SLOT(saveAll()) );
a->setWhatsThis(i18n("Save all open, modified documents to disk."));
- a = actionCollection()->addAction( QLatin1String("file_reload_all") );
+ a = actionCollection()->addAction( QStringLiteral("file_reload_all") );
a->setText( i18n("&Reload All") );
connect( a, SIGNAL(triggered()), KateDocManager::self(), SLOT(reloadAll()) );
a->setWhatsThis(i18n("Reload all open documents."));
- a = actionCollection()->addAction( QLatin1String("file_close_orphaned") );
+ a = actionCollection()->addAction( QStringLiteral("file_close_orphaned") );
a->setText( i18n("Close Orphaned") );
connect( a, SIGNAL(triggered()), KateDocManager::self(), SLOT(closeOrphaned()) );
a->setWhatsThis(i18n("Close all documents in the file list that could not be reopened, because they are not accessible anymore."));
- actionCollection()->addAction( KStandardAction::Close, QLatin1String("file_close"), m_viewManager, SLOT(slotDocumentClose()) )
+ actionCollection()->addAction( KStandardAction::Close, QStringLiteral("file_close"), m_viewManager, SLOT(slotDocumentClose()) )
->setWhatsThis(i18n("Close the current document."));
- a = actionCollection()->addAction( QLatin1String("file_close_other") );
+ a = actionCollection()->addAction( QStringLiteral("file_close_other") );
a->setText( i18n( "Close Other" ) );
connect( a, SIGNAL(triggered()), this, SLOT(slotDocumentCloseOther()) );
a->setWhatsThis(i18n("Close other open documents."));
- a = actionCollection()->addAction( QLatin1String("file_close_all") );
+ a = actionCollection()->addAction( QStringLiteral("file_close_all") );
a->setText( i18n( "Clos&e All" ) );
connect( a, SIGNAL(triggered()), this, SLOT(slotDocumentCloseAll()) );
a->setWhatsThis(i18n("Close all open documents."));
- a = actionCollection()->addAction( KStandardAction::Quit, QLatin1String("file_quit") );
+ a = actionCollection()->addAction( KStandardAction::Quit, QStringLiteral("file_quit") );
// Qt::QueuedConnection: delay real shutdown, as we are inside menu action handling (bug #185708)
connect( a, SIGNAL(triggered()), this, SLOT(slotFileQuit()), Qt::QueuedConnection );
a->setWhatsThis(i18n("Close this window"));
- a = actionCollection()->addAction( QLatin1String("view_new_view") );
- a->setIcon( QIcon::fromTheme(QLatin1String("window-new")) );
+ a = actionCollection()->addAction( QStringLiteral("view_new_view") );
+ a->setIcon( QIcon::fromTheme(QStringLiteral("window-new")) );
a->setText( i18n("&New Window") );
connect( a, SIGNAL(triggered()), this, SLOT(newWindow()) );
a->setWhatsThis(i18n("Create a new Kate view (a new window with the same document list)."));
- a = actionCollection()->addAction( QLatin1String("view_quick_open") );
- a->setIcon( QIcon::fromTheme(QLatin1String("fork")) );
+ a = actionCollection()->addAction( QStringLiteral("view_quick_open") );
+ a->setIcon( QIcon::fromTheme(QStringLiteral("fork")) );
a->setText( i18n("&Quick Open") );
QList<QKeySequence> scuts;
scuts << QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_O)
@@ -329,7 +329,7 @@ void KateMainWindow::setupActions()
connect( showFullScreenAction, SIGNAL(toggled(bool)), this, SLOT(slotFullScreen(bool)));
documentOpenWith = new KActionMenu(i18n("Open W&ith"), this);
- actionCollection()->addAction(QLatin1String("file_open_with"), documentOpenWith);
+ actionCollection()->addAction(QStringLiteral("file_open_with"), documentOpenWith);
documentOpenWith->setWhatsThis(i18n("Open the current document using another application registered for its file type, or an application of your choice."));
connect(documentOpenWith->menu(), SIGNAL(aboutToShow()), this, SLOT(mSlotFixOpenWithMenu()));
connect(documentOpenWith->menu(), SIGNAL(triggered(QAction*)), this, SLOT(slotOpenWithMenuAction(QAction*)));
@@ -345,13 +345,13 @@ void KateMainWindow::setupActions()
if (KatePluginManager::self()->pluginList().count() > 0)
{
- a = actionCollection()->addAction( QLatin1String("help_plugins_contents") );
+ a = actionCollection()->addAction( QStringLiteral("help_plugins_contents") );
a->setText( i18n("&Plugins Handbook") );
connect( a, SIGNAL(triggered()), this, SLOT(pluginHelp()) );
a->setWhatsThis(i18n("This shows help files for various available plugins."));
}
- a = actionCollection()->addAction( QLatin1String("help_about_editor") );
+ a = actionCollection()->addAction( QStringLiteral("help_about_editor") );
a->setText( i18n("&About Editor Component") );
connect( a, SIGNAL(triggered()), this, SLOT(aboutEditor()) );
@@ -367,33 +367,33 @@ void KateMainWindow::setupActions()
slotWindowActivated ();
// session actions
- a = actionCollection()->addAction( QLatin1String("sessions_new") );
- a->setIcon( QIcon::fromTheme(QLatin1String("document-new")) );
+ a = actionCollection()->addAction( QStringLiteral("sessions_new") );
+ a->setIcon( QIcon::fromTheme(QStringLiteral("document-new")) );
a->setText( i18nc("Menu entry Session->New", "&New") );
// Qt::QueuedConnection to avoid deletion of code that is executed when reducing the amount of mainwindows. (bug #227008)
connect( a, SIGNAL(triggered()), KateSessionManager::self(), SLOT(sessionNew()), Qt::QueuedConnection );
- a = actionCollection()->addAction( QLatin1String("sessions_open") );
- a->setIcon( QIcon::fromTheme(QLatin1String("document-open")) );
+ a = actionCollection()->addAction( QStringLiteral("sessions_open") );
+ a->setIcon( QIcon::fromTheme(QStringLiteral("document-open")) );
a->setText( i18n("&Open Session") );
// Qt::QueuedConnection to avoid deletion of code that is executed when reducing the amount of mainwindows. (bug #227008)
connect( a, SIGNAL(triggered()), KateSessionManager::self(), SLOT(sessionOpen()), Qt::QueuedConnection );
- a = actionCollection()->addAction( QLatin1String("sessions_save") );
- a->setIcon( QIcon::fromTheme(QLatin1String("document-save")) );
+ a = actionCollection()->addAction( QStringLiteral("sessions_save") );
+ a->setIcon( QIcon::fromTheme(QStringLiteral("document-save")) );
a->setText( i18n("&Save Session") );
connect( a, SIGNAL(triggered()), KateSessionManager::self(), SLOT(sessionSave()) );
- a = actionCollection()->addAction( QLatin1String("sessions_save_as") );
- a->setIcon( QIcon::fromTheme(QLatin1String("document-save-as")) );
+ a = actionCollection()->addAction( QStringLiteral("sessions_save_as") );
+ a->setIcon( QIcon::fromTheme(QStringLiteral("document-save-as")) );
a->setText( i18n("Save Session &As...") );
connect( a, SIGNAL(triggered()), KateSessionManager::self(), SLOT(sessionSaveAs()) );
- a = actionCollection()->addAction( QLatin1String("sessions_manage") );
- a->setIcon( QIcon::fromTheme(QLatin1String("view-choose")) );
+ a = actionCollection()->addAction( QStringLiteral("sessions_manage") );
+ a->setIcon( QIcon::fromTheme(QStringLiteral("view-choose")) );
a->setText( i18n("&Manage Sessions...") );
// Qt::QueuedConnection to avoid deletion of code that is executed when reducing the amount of mainwindows. (bug #227008)
connect( a, SIGNAL(triggered()), KateSessionManager::self(), SLOT(sessionManage()), Qt::QueuedConnection );
// quick open menu ;)
a = new KateSessionsAction (i18n("&Quick Open Session"), this);
- actionCollection()->addAction(QLatin1String("sessions_list"), a);
+ actionCollection()->addAction(QStringLiteral("sessions_list"), a);
}
void KateMainWindow::slotDocumentCloseAll()
@@ -403,7 +403,7 @@ void KateMainWindow::slotDocumentCloseAll()
i18n ("Close all documents"),
KStandardGuiItem::cont(),
KStandardGuiItem::cancel(),
- QLatin1String("closeAll")) != KMessageBox::Cancel)
+ QStringLiteral("closeAll")) != KMessageBox::Cancel)
{
if (queryClose_internal())
KateDocManager::self()->closeAllDocuments(false);
@@ -752,12 +752,12 @@ void KateMainWindow::mSlotFixOpenWithMenu()
//qCDebug(LOG_KATE) << "mime type: " << mime.name();
QAction *a = 0;
- KService::List offers = KMimeTypeTrader::self()->query(mime.name(), QLatin1String("Application"));
+ KService::List offers = KMimeTypeTrader::self()->query(mime.name(), QStringLiteral("Application"));
// add all default open-with-actions except "Kate"
for(KService::List::Iterator it = offers.begin(); it != offers.end(); ++it)
{
KService::Ptr service = *it;
- if (service->name() == QLatin1String("Kate")) continue;
+ if (service->name() == QStringLiteral("Kate")) continue;
a = menu->addAction(QIcon::fromTheme(service->icon()), service->name());
a->setData(service->entryPath());
}
@@ -794,7 +794,7 @@ void KateMainWindow::slotOpenWithMenuAction(QAction* a)
void KateMainWindow::pluginHelp()
{
- KHelpClient::invokeHelp (QString(), QLatin1String("kate-plugins"));
+ KHelpClient::invokeHelp (QString(), QStringLiteral("kate-plugins"));
}
void KateMainWindow::aboutEditor()
diff --git a/kate/app/katemdi.cpp b/kate/app/katemdi.cpp
index 9568859..25f5914 100644
--- a/kate/app/katemdi.cpp
+++ b/kate/app/katemdi.cpp
@@ -88,9 +88,9 @@ namespace KateMDI
//BEGIN GUICLIENT
- static const QString actionListName = QLatin1String("kate_mdi_view_actions");
+ static const QString actionListName = QStringLiteral("kate_mdi_view_actions");
- static const QString guiDescription = QLatin1String(""
+ static const QString guiDescription = QStringLiteral(""
"<!DOCTYPE kpartgui><kpartgui name=\"kate_mdi_view_actions\">"
"<MenuBar>"
" <Menu name=\"view\">"
@@ -115,9 +115,9 @@ namespace KateMDI
}
m_toolMenu = new KActionMenu(i18n("Tool &Views"), this);
- actionCollection()->addAction(QLatin1String("kate_mdi_toolview_menu"), m_toolMenu);
+ actionCollection()->addAction(QStringLiteral("kate_mdi_toolview_menu"), m_toolMenu);
m_showSidebarsAction = new KToggleAction( i18n("Show Side&bars"), this );
- actionCollection()->addAction( QLatin1String("kate_mdi_sidebar_visibility"), m_showSidebarsAction );
+ actionCollection()->addAction( QStringLiteral("kate_mdi_sidebar_visibility"), m_showSidebarsAction );
m_showSidebarsAction->setShortcut( Qt::CTRL | Qt::ALT | Qt::SHIFT | Qt::Key_F );
m_showSidebarsAction->setChecked( m_mw->sidebarsVisible() );
@@ -130,7 +130,7 @@ namespace KateMDI
m_toolMenu->addAction( sep_act );
// read shortcuts
- actionCollection()->setConfigGroup( QLatin1String("Shortcuts") );
+ actionCollection()->setConfigGroup( QStringLiteral("Shortcuts") );
actionCollection()->readSettings();
actionCollection()->addAssociatedWidget(m_mw);
@@ -498,24 +498,24 @@ namespace KateMDI
}
}
- menu->addSection(SmallIcon(QLatin1String("view_remove")), i18n("Behavior"));
+ menu->addSection(SmallIcon(QStringLiteral("view_remove")), i18n("Behavior"));
- menu->addAction(w->persistent ? QIcon::fromTheme(QLatin1String("view-restore")) : QIcon::fromTheme(QLatin1String("view-fullscreen")),
+ menu->addAction(w->persistent ? QIcon::fromTheme(QStringLiteral("view-restore")) : QIcon::fromTheme(QStringLiteral("view-fullscreen")),
w->persistent ? i18n("Make Non-Persistent") : i18n("Make Persistent") ) -> setData(10);
- menu->addSection(SmallIcon(QLatin1String("move")), i18n("Move To"));
+ menu->addSection(SmallIcon(QStringLiteral("move")), i18n("Move To"));
if (position() != 0)
- menu->addAction(QIcon::fromTheme(QLatin1String("go-previous")), i18n("Left Sidebar"))->setData(0);
+ menu->addAction(QIcon::fromTheme(QStringLiteral("go-previous")), i18n("Left Sidebar"))->setData(0);
if (position() != 1)
- menu->addAction(QIcon::fromTheme(QLatin1String("go-next")), i18n("Right Sidebar"))->setData(1);
+ menu->addAction(QIcon::fromTheme(QStringLiteral("go-next")), i18n("Right Sidebar"))->setData(1);
if (position() != 2)
- menu->addAction(QIcon::fromTheme(QLatin1String("go-up")), i18n("Top Sidebar"))->setData(2);
+ menu->addAction(QIcon::fromTheme(QStringLiteral("go-up")), i18n("Top Sidebar"))->setData(2);
if (position() != 3)
- menu->addAction(QIcon::fromTheme(QLatin1String("go-down")), i18n("Bottom Sidebar"))->setData(3);
+ menu->addAction(QIcon::fromTheme(QStringLiteral("go-down")), i18n("Bottom Sidebar"))->setData(3);
connect(menu, SIGNAL(triggered(QAction*)),
this, SLOT(buttonPopupActivate(QAction*)));
@@ -862,7 +862,7 @@ namespace KateMDI
"invoke <b>View &gt; Tool Views &gt; Show Sidebars</b> "
"in the menu. It is still possible to show/hide "
"the tool views with the assigned shortcuts.</qt>"),
- QString(), QLatin1String("Kate hide sidebars notification message") );
+ QString(), QStringLiteral("Kate hide sidebars notification message") );
}
}
diff --git a/kate/app/katemwmodonhddialog.cpp b/kate/app/katemwmodonhddialog.cpp
index 7de5ec5..3c38cb0 100644
--- a/kate/app/katemwmodonhddialog.cpp
+++ b/kate/app/katemwmodonhddialog.cpp
@@ -77,7 +77,7 @@ KateMwModOnHdDialog::KateMwModOnHdDialog( DocVector docs, QWidget *parent, const
// dialog text
QLabel *icon = new QLabel(this);
hb->addWidget(icon);
- icon->setPixmap( DesktopIcon(QLatin1String("dialog-warning")) );
+ icon->setPixmap( DesktopIcon(QStringLiteral("dialog-warning")) );
QLabel *t = new QLabel(i18n(
"<qt>The documents listed below have changed on disk.<p>Select one "
@@ -109,7 +109,7 @@ KateMwModOnHdDialog::KateMwModOnHdDialog( DocVector docs, QWidget *parent, const
hb = new QHBoxLayout;
mainLayout->addLayout(hb);
- QPushButton *btnDiff = new QPushButton(QIcon::fromTheme(QLatin1String("document-preview")), i18n("&View Difference"), this);
+ QPushButton *btnDiff = new QPushButton(QIcon::fromTheme(QStringLiteral("document-preview")), i18n("&View Difference"), this);
btnDiff->setWhatsThis(i18n(
"Calculates the difference between the editor contents and the disk "
"file for the selected document, and shows the difference with the "
@@ -121,7 +121,7 @@ KateMwModOnHdDialog::KateMwModOnHdDialog( DocVector docs, QWidget *parent, const
QDialogButtonBox *buttons = new QDialogButtonBox(this);
mainLayout->addWidget(buttons);
- QPushButton *ignoreButton = new QPushButton(QIcon::fromTheme(QLatin1String("dialog-warning")), i18n("&Ignore Changes"));
+ QPushButton *ignoreButton = new QPushButton(QIcon::fromTheme(QStringLiteral("dialog-warning")), i18n("&Ignore Changes"));
ignoreButton->setToolTip(i18n("Remove modified flag from selected documents"));
buttons->addButton(ignoreButton, QDialogButtonBox::RejectRole);
connect(ignoreButton, SIGNAL(clicked()), this, SLOT(slotIgnore()));
@@ -132,7 +132,7 @@ KateMwModOnHdDialog::KateMwModOnHdDialog( DocVector docs, QWidget *parent, const
connect(overwriteButton, SIGNAL(clicked()), this, SLOT(slotOverwrite()));
- QPushButton *reloadButton = new QPushButton(QIcon::fromTheme(QLatin1String("view-refresh")), i18n("&Reload"));
+ QPushButton *reloadButton = new QPushButton(QIcon::fromTheme(QStringLiteral("view-refresh")), i18n("&Reload"));
reloadButton->setDefault(true);
reloadButton->setToolTip(i18n("Reload selected documents from disk"));
connect(reloadButton, SIGNAL(clicked()), this, SLOT(slotReload()));
@@ -253,7 +253,7 @@ void KateMwModOnHdDialog::slotDiff()
// Start a KProcess that creates a diff
m_proc = new KProcess( this );
m_proc->setOutputChannelMode( KProcess::MergedChannels );
- *m_proc << QLatin1String("diff") << QLatin1String("-ub") << QLatin1String("-") << doc->url().toLocalFile();
+ *m_proc << QStringLiteral("diff") << QStringLiteral("-ub") << QStringLiteral("-") << doc->url().toLocalFile();
connect( m_proc, SIGNAL(readyRead()), this, SLOT(slotDataAvailable()) );
connect( m_proc, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(slotPDone()) );
@@ -313,7 +313,7 @@ void KateMwModOnHdDialog::slotPDone()
m_diffFile = 0;
// KRun::runUrl should delete the file, once the client exits
- KRun::runUrl( url, QLatin1String("text/x-patch"), this, true );
+ KRun::runUrl( url, QStringLiteral("text/x-patch"), this, true );
}
void KateMwModOnHdDialog::addDocument(KTextEditor::Document *doc)
diff --git a/kate/app/katepluginmanager.cpp b/kate/app/katepluginmanager.cpp
index 5214330..35f2f1f 100644
--- a/kate/app/katepluginmanager.cpp
+++ b/kate/app/katepluginmanager.cpp
@@ -57,7 +57,7 @@ KatePluginManager *KatePluginManager::self()
void KatePluginManager::setupPluginList ()
{
- KService::List traderList = KServiceTypeTrader::self()->query(QLatin1String("KTextEditor/Plugin"));
+ KService::List traderList = KServiceTypeTrader::self()->query(QStringLiteral("KTextEditor/Plugin"));
KatePluginList alwaysLoad;
KatePluginList others;
@@ -67,7 +67,7 @@ void KatePluginManager::setupPluginList ()
info.service = ptr;
// decide if this is an integral plugin
- if (info.service->library() == QLatin1String("katefiletreeplugin"))
+ if (info.service->library() == QStringLiteral("katefiletreeplugin"))
info.alwaysLoad = true;
else
info.alwaysLoad = false;
@@ -104,7 +104,7 @@ void KatePluginManager::loadConfig (KConfig* config)
* ask config object
*/
if (config) {
- KConfigGroup cg = KConfigGroup(config, QLatin1String("Kate Plugins"));
+ KConfigGroup cg = KConfigGroup(config, QStringLiteral("Kate Plugins"));
// disable all plugin if no config...
for (int i = 0; i < m_pluginList.size(); ++i)
@@ -133,7 +133,7 @@ void KatePluginManager::writeConfig(KConfig* config)
{
Q_ASSERT( config );
- KConfigGroup cg = KConfigGroup( config, QLatin1String("Kate Plugins") );
+ KConfigGroup cg = KConfigGroup( config, QStringLiteral("Kate Plugins") );
foreach(const KatePluginInfo &plugin, m_pluginList)
{
QString saveName = plugin.saveName();
diff --git a/kate/app/katequickopen.cpp b/kate/app/katequickopen.cpp
index 3729c6c..d8c657d 100644
--- a/kate/app/katequickopen.cpp
+++ b/kate/app/katequickopen.cpp
@@ -226,7 +226,7 @@ void KateQuickOpen::update ()
/**
* insert all project files, if any project around
*/
- if (QObject *projectView = m_mainWindow->pluginView (QLatin1String("kateprojectplugin"))) {
+ if (QObject *projectView = m_mainWindow->pluginView (QStringLiteral("kateprojectplugin"))) {
QStringList projectFiles = projectView->property ("projectFiles").toStringList();
foreach (const QString &file, projectFiles) {
/**
diff --git a/kate/app/katerunninginstanceinfo.cpp b/kate/app/katerunninginstanceinfo.cpp
index 9fc5c2c..4846cff 100644
--- a/kate/app/katerunninginstanceinfo.cpp
+++ b/kate/app/katerunninginstanceinfo.cpp
@@ -41,7 +41,7 @@ bool fillinRunningKateAppInstances(KateRunningInstanceMap *map)
foreach (const QString &s, services)
{
- if (s.startsWith (QLatin1String("org.kde.kate-")))
+ if (s.startsWith (QStringLiteral("org.kde.kate-")))
{
if (s.contains(my_pid)) continue;
KateRunningInstanceInfo* rii=new KateRunningInstanceInfo(s);
diff --git a/kate/app/katerunninginstanceinfo.h b/kate/app/katerunninginstanceinfo.h
index 7a522e1..07b5230 100644
--- a/kate/app/katerunninginstanceinfo.h
+++ b/kate/app/katerunninginstanceinfo.h
@@ -34,7 +34,7 @@ class KateRunningInstanceInfo: public QObject {
KateRunningInstanceInfo(const QString& serviceName_):
QObject(),valid(false),
serviceName(serviceName_),
- dbus_if(new QDBusInterface(serviceName_,QLatin1String("/MainApplication"),
+ dbus_if(new QDBusInterface(serviceName_,QStringLiteral("/MainApplication"),
QString(), //I don't know why it does not work if I specify org.kde.Kate.Application here
QDBusConnection::sessionBus(),this)) {
if (!dbus_if->isValid()) {
diff --git a/kate/app/katesavemodifieddialog.cpp b/kate/app/katesavemodifieddialog.cpp
index 4d87c05..8978776 100644
--- a/kate/app/katesavemodifieddialog.cpp
+++ b/kate/app/katesavemodifieddialog.cpp
@@ -61,11 +61,11 @@ class AbstractKateSaveModifiedDialogCheckListItem: public QTreeWidgetItem
setIcon(0, QIcon());
break;
case SaveOKState:
- setIcon(0, loader->loadIcon(QLatin1String("dialog-ok"), KIconLoader::NoGroup,/*height()*/16));
- // QLatin1String("ok") icon should probably be QLatin1String("dialog-success"), but we don't have that icon in KDE 4.0
+ setIcon(0, loader->loadIcon(QStringLiteral("dialog-ok"), KIconLoader::NoGroup,/*height()*/16));
+ // QStringLiteral("ok") icon should probably be QStringLiteral("dialog-success"), but we don't have that icon in KDE 4.0
break;
case SaveFailedState:
- setIcon(0, loader->loadIcon(QLatin1String("dialog-error"), KIconLoader::NoGroup,/*height()*/16));
+ setIcon(0, loader->loadIcon(QStringLiteral("dialog-error"), KIconLoader::NoGroup,/*height()*/16));
break;
}
}
@@ -178,7 +178,7 @@ KateSaveModifiedDialog::KateSaveModifiedDialog(QWidget *parent, QList<KTextEdito
QDialog(parent)
{
setWindowTitle(i18n("Save Documents"));
- setObjectName(QLatin1String("KateSaveModifiedDialog"));
+ setObjectName(QStringLiteral("KateSaveModifiedDialog"));
setModal(true);
QVBoxLayout *mainLayout = new QVBoxLayout;
diff --git a/kate/app/kateviewmanager.cpp b/kate/app/kateviewmanager.cpp
index cc44ce1..5b98ee6 100644
--- a/kate/app/kateviewmanager.cpp
+++ b/kate/app/kateviewmanager.cpp
@@ -114,70 +114,70 @@ void KateViewManager::setupActions ()
/**
* view splitting
*/
- a = m_mainWindow->actionCollection()->addAction(QLatin1String("view_split_vert"));
- a->setIcon( QIcon::fromTheme(QLatin1String("view-split-left-right")) );
+ a = m_mainWindow->actionCollection()->addAction(QStringLiteral("view_split_vert"));
+ a->setIcon( QIcon::fromTheme(QStringLiteral("view-split-left-right")) );
a->setText( i18n("Split Ve&rtical") );
a->setShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_L );
connect(a, SIGNAL(triggered()), this, SLOT(slotSplitViewSpaceVert()));
a->setWhatsThis(i18n("Split the currently active view vertically into two views."));
- a = m_mainWindow->actionCollection()->addAction(QLatin1String("view_split_horiz"));
- a->setIcon( QIcon::fromTheme(QLatin1String("view-split-top-bottom")) );
+ a = m_mainWindow->actionCollection()->addAction(QStringLiteral("view_split_horiz"));
+ a->setIcon( QIcon::fromTheme(QStringLiteral("view-split-top-bottom")) );
a->setText( i18n("Split &Horizontal") );
a->setShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_T );
connect(a, SIGNAL(triggered()), this, SLOT(slotSplitViewSpaceHoriz()));
a->setWhatsThis(i18n("Split the currently active view horizontally into two views."));
- m_closeView = m_mainWindow->actionCollection()->addAction(QLatin1String("view_close_current_space"));
- m_closeView->setIcon( QIcon::fromTheme(QLatin1String("view-close")) );
+ m_closeView = m_mainWindow->actionCollection()->addAction(QStringLiteral("view_close_current_space"));
+ m_closeView->setIcon( QIcon::fromTheme(QStringLiteral("view-close")) );
m_closeView->setText( i18n("Cl&ose Current View") );
m_closeView->setShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_R );
connect(m_closeView, SIGNAL(triggered()), this, SLOT(slotCloseCurrentViewSpace()));
m_closeView->setWhatsThis(i18n("Close the currently active split view"));
- m_closeOtherViews = m_mainWindow->actionCollection()->addAction(QLatin1String("view_close_others"));
- m_closeOtherViews->setIcon(QIcon::fromTheme(QLatin1String("view-close")));
+ m_closeOtherViews = m_mainWindow->actionCollection()->addAction(QStringLiteral("view_close_others"));
+ m_closeOtherViews->setIcon(QIcon::fromTheme(QStringLiteral("view-close")));
m_closeOtherViews->setText(i18n("Close Inactive Views"));
connect(m_closeOtherViews, SIGNAL(triggered()), this, SLOT(slotCloseOtherViews()));
m_closeOtherViews->setWhatsThis(i18n("Close every view but the active one"));
- goNext = m_mainWindow->actionCollection()->addAction( QLatin1String("go_next_split_view") );
+ goNext = m_mainWindow->actionCollection()->addAction( QStringLiteral("go_next_split_view") );
goNext->setText( i18n("Next Split View") );
goNext->setShortcut( Qt::Key_F8 );
connect(goNext, SIGNAL(triggered()), this, SLOT(activateNextView()));
goNext->setWhatsThis(i18n("Make the next split view the active one."));
- goPrev = m_mainWindow->actionCollection()->addAction( QLatin1String("go_prev_split_view") );
+ goPrev = m_mainWindow->actionCollection()->addAction( QStringLiteral("go_prev_split_view") );
goPrev->setText( i18n("Previous Split View") );
goPrev->setShortcut( Qt::SHIFT + Qt::Key_F8 );
connect(goPrev, SIGNAL(triggered()), this, SLOT(activatePrevView()));
goPrev->setWhatsThis(i18n("Make the previous split view the active one."));
- a = m_mainWindow->actionCollection()->addAction(QLatin1String("view_split_move_right"));
+ a = m_mainWindow->actionCollection()->addAction(QStringLiteral("view_split_move_right"));
a->setText( i18n("Move Splitter Right") );
connect(a, SIGNAL(triggered()), this, SLOT(moveSplitterRight()));
a->setWhatsThis(i18n("Move the splitter of the current view to the right"));
- a = m_mainWindow->actionCollection()->addAction(QLatin1String("view_split_move_left"));
+ a = m_mainWindow->actionCollection()->addAction(QStringLiteral("view_split_move_left"));
a->setText( i18n("Move Splitter Left") );
connect(a, SIGNAL(triggered()), this, SLOT(moveSplitterLeft()));
a->setWhatsThis(i18n("Move the splitter of the current view to the left"));
- a = m_mainWindow->actionCollection()->addAction(QLatin1String("view_split_move_up"));
+ a = m_mainWindow->actionCollection()->addAction(QStringLiteral("view_split_move_up"));
a->setText( i18n("Move Splitter Up") );
connect(a, SIGNAL(triggered()), this, SLOT(moveSplitterUp()));
a->setWhatsThis(i18n("Move the splitter of the current view up"));
- a = m_mainWindow->actionCollection()->addAction(QLatin1String("view_split_move_down"));
+ a = m_mainWindow->actionCollection()->addAction(QStringLiteral("view_split_move_down"));
a->setText( i18n("Move Splitter Down") );
connect(a, SIGNAL(triggered()), this, SLOT(moveSplitterDown()));
@@ -187,32 +187,32 @@ void KateViewManager::setupActions ()
* Status Bar Items menu
*/
m_cursorPosToggle = new KToggleAction(i18n("Show Cursor Position"), this);
- m_mainWindow->actionCollection()->addAction( QLatin1String("show_cursor_pos"), m_cursorPosToggle );
+ m_mainWindow->actionCollection()->addAction( QStringLiteral("show_cursor_pos"), m_cursorPosToggle );
connect(m_cursorPosToggle, SIGNAL(toggled(bool)),
this, SIGNAL(cursorPositionItemVisibilityChanged(bool)));
m_charCountToggle = new KToggleAction(i18n("Show Characters Count"), this);
- m_mainWindow->actionCollection()->addAction( QLatin1String("show_char_count"), m_charCountToggle );
+ m_mainWindow->actionCollection()->addAction( QStringLiteral("show_char_count"), m_charCountToggle );
connect(m_charCountToggle, SIGNAL(toggled(bool)),
this, SIGNAL(charactersCountItemVisibilityChanged(bool)));
m_insertModeToggle = new KToggleAction(i18n("Show Insertion Mode"), this);
- m_mainWindow->actionCollection()->addAction( QLatin1String("show_insert_mode"), m_insertModeToggle );
+ m_mainWindow->actionCollection()->addAction( QStringLiteral("show_insert_mode"), m_insertModeToggle );
connect(m_insertModeToggle, SIGNAL(toggled(bool)),
this, SIGNAL(insertModeItemVisibilityChanged(bool)));
m_selectModeToggle = new KToggleAction(i18n("Show Selection Mode"), this);
- m_mainWindow->actionCollection()->addAction( QLatin1String("show_select_mode"), m_selectModeToggle );
+ m_mainWindow->actionCollection()->addAction( QStringLiteral("show_select_mode"), m_selectModeToggle );
connect(m_selectModeToggle, SIGNAL(toggled(bool)),
this, SIGNAL(selectModeItemVisibilityChanged(bool)));
m_encodingToggle = new KToggleAction(i18n("Show Encoding"), this);
- m_mainWindow->actionCollection()->addAction( QLatin1String("show_encoding"), m_encodingToggle );
+ m_mainWindow->actionCollection()->addAction( QStringLiteral("show_encoding"), m_encodingToggle );
connect(m_encodingToggle, SIGNAL(toggled(bool)),
this, SIGNAL(encodingItemVisibilityChanged(bool)));
m_docNameToggle = new KToggleAction(i18n("Show Document Name"), this);
- m_mainWindow->actionCollection()->addAction( QLatin1String("show_doc_name"), m_docNameToggle );
+ m_mainWindow->actionCollection()->addAction( QStringLiteral("show_doc_name"), m_docNameToggle );
connect(m_docNameToggle, SIGNAL(toggled(bool)),
this, SIGNAL(documentNameItemVisibilityChanged(bool)));
}
@@ -439,8 +439,8 @@ bool KateViewManager::createView ( KTextEditor::Document *doc )
m_activeStates[view] = false;
// disable settings dialog action
- delete view->actionCollection()->action( QLatin1String("set_confdlg") );
- delete view->actionCollection()->action( QLatin1String("editor_options") );
+ delete view->actionCollection()->action( QStringLiteral("set_confdlg") );
+ delete view->actionCollection()->action( QStringLiteral("editor_options") );
//view->setContextMenu(view->defaultContextMenu());
@@ -905,7 +905,7 @@ void KateViewManager::restoreViewConfiguration (const KConfigGroup& config)
m_minAge = 0;
// start recursion for the root splitter (Splitter 0)
- restoreSplitter( config.config(), config.name() + QLatin1String("-Splitter 0"), this, config.name() );
+ restoreSplitter( config.config(), config.name() + QStringLiteral("-Splitter 0"), this, config.name() );
// finally, make the correct view from the last session active
int lastViewSpace = config.readEntry("Active ViewSpace", 0);
@@ -962,7 +962,7 @@ void KateViewManager::restoreViewConfiguration (const KConfigGroup& config)
void KateViewManager::saveSplitterConfig( QSplitter* s, KConfigBase* configBase, const QString& viewConfGrp )
{
- QString grp = QString(viewConfGrp + QLatin1String("-Splitter %1")).arg(m_splitterIndex);
+ QString grp = QString(viewConfGrp + QStringLiteral("-Splitter %1")).arg(m_splitterIndex);
KConfigGroup config( configBase, grp );
// Save sizes, orient, children for this splitter
@@ -981,7 +981,7 @@ void KateViewManager::saveSplitterConfig( QSplitter* s, KConfigBase* configBase,
// For KateViewSpaces, ask them to save the file list.
if ( kvs )
{
- n = QString(viewConfGrp + QLatin1String("-ViewSpace %1")).arg( m_viewSpaceList.indexOf(kvs) );
+ n = QString(viewConfGrp + QStringLiteral("-ViewSpace %1")).arg( m_viewSpaceList.indexOf(kvs) );
kvs->saveConfig ( configBase, m_viewSpaceList.indexOf(kvs), viewConfGrp);
// save active viewspace
if ( kvs->isActiveSpace() )
@@ -994,7 +994,7 @@ void KateViewManager::saveSplitterConfig( QSplitter* s, KConfigBase* configBase,
else if ( QSplitter* splitter = qobject_cast<QSplitter*>(obj) )
{
++m_splitterIndex;
- n = QString(viewConfGrp + QLatin1String("-Splitter %1")).arg( m_splitterIndex );
+ n = QString(viewConfGrp + QStringLiteral("-Splitter %1")).arg( m_splitterIndex );
saveSplitterConfig( splitter, configBase, viewConfGrp);
}
@@ -1015,7 +1015,7 @@ void KateViewManager::restoreSplitter( const KConfigBase* configBase, const QStr
for (QStringList::Iterator it = children.begin(); it != children.end(); ++it)
{
// for a viewspace, create it and open all documents therein.
- if ( (*it).startsWith(viewConfGrp + QLatin1String("-ViewSpace")) )
+ if ( (*it).startsWith(viewConfGrp + QStringLiteral("-ViewSpace")) )
{
KateViewSpace* vs = new KateViewSpace( this, 0 );
m_viewSpaceList.append( vs );
diff --git a/kate/app/kateviewspace.cpp b/kate/app/kateviewspace.cpp
index 7830b71..b2141b5 100644
--- a/kate/app/kateviewspace.cpp
+++ b/kate/app/kateviewspace.cpp
@@ -214,7 +214,7 @@ void KateViewSpace::setActive( bool active, bool )
void KateViewSpace::saveConfig ( KConfigBase* config, int myIndex , const QString& viewConfGrp)
{
// qCDebug(LOG_KATE)<<"KateViewSpace::saveConfig("<<myIndex<<", "<<viewConfGrp<<") - currentView: "<<currentView()<<")";
- QString groupname = QString(viewConfGrp + QLatin1String("-ViewSpace %1")).arg( myIndex );
+ QString groupname = QString(viewConfGrp + QStringLiteral("-ViewSpace %1")).arg( myIndex );
KConfigGroup group (config, groupname);
group.writeEntry ("Count", mViewList.count());
@@ -328,10 +328,10 @@ KateVSStatusBar::KateVSStatusBar ( KateViewSpace *parent)
#endif
installEventFilter( this );
- m_modPm = QIcon::fromTheme(QLatin1String("document-save")).pixmap(16);
- m_modDiscPm = QIcon::fromTheme(QLatin1String("dialog-warning")).pixmap(16);
- QIcon icon = KIconUtils::addOverlay(QIcon::fromTheme(QLatin1String("document-save")),
- QIcon::fromTheme(QLatin1String("emblem-important")),
+ m_modPm = QIcon::fromTheme(QStringLiteral("document-save")).pixmap(16);
+ m_modDiscPm = QIcon::fromTheme(QStringLiteral("dialog-warning")).pixmap(16);
+ QIcon icon = KIconUtils::addOverlay(QIcon::fromTheme(QStringLiteral("document-save")),
+ QIcon::fromTheme(QStringLiteral("emblem-important")),
Qt::TopLeftCorner);
m_modmodPm = icon.pixmap(16);
}
@@ -342,7 +342,7 @@ KateVSStatusBar::~KateVSStatusBar ()
void KateVSStatusBar::showMenu()
{
KXmlGuiWindow* mainWindow = static_cast<KXmlGuiWindow*>( window() );
- QMenu* menu = static_cast<QMenu*>( mainWindow->factory()->container(QLatin1String("viewspace_popup"), mainWindow ) );
+ QMenu* menu = static_cast<QMenu*>( mainWindow->factory()->container(QStringLiteral("viewspace_popup"), mainWindow ) );
if (menu)
menu->exec(QCursor::pos());
diff --git a/kate/app/main.cpp b/kate/app/main.cpp
index 73d3c69..b75a9c2 100644
--- a/kate/app/main.cpp
+++ b/kate/app/main.cpp
@@ -81,37 +81,37 @@ extern "C" Q_DECL_EXPORT int kdemain( int argc, char **argv )
/**
* construct about data for Kate
*/
- KAboutData aboutData (QLatin1String("kate"), QString(), i18n("Kate"), QLatin1String(KATE_VERSION),
+ KAboutData aboutData (QStringLiteral("kate"), QString(), i18n("Kate"), QStringLiteral(KATE_VERSION),
i18n( "Kate - Advanced Text Editor" ), KAboutData::License_LGPL_V2,
- i18n( "(c) 2000-2014 The Kate Authors" ), QString(), QLatin1String("http://kate-editor.org"));
+ i18n( "(c) 2000-2014 The Kate Authors" ), QString(), QStringLiteral("http://kate-editor.org"));
/**
* right dbus prefix == org.kde.
*/
aboutData.setOrganizationDomain ("kde.org");
- aboutData.addAuthor (i18n("Christoph Cullmann"), i18n("Maintainer"), QLatin1String("cullmann@kde.org"), QLatin1String("http://www.cullmann.io"));
- aboutData.addAuthor (i18n("Anders Lund"), i18n("Core Developer"), QLatin1String("anders@alweb.dk"), QLatin1String("http://www.alweb.dk"));
- aboutData.addAuthor (i18n("Joseph Wenninger"), i18n("Core Developer"), QLatin1String("jowenn@kde.org"), QLatin1String("http://stud3.tuwien.ac.at/~e9925371"));
- aboutData.addAuthor (i18n("Hamish Rodda"), i18n("Core Developer"), QLatin1String("rodda@kde.org"));
- aboutData.addAuthor (i18n("Dominik Haumann"), i18n("Developer & Highlight wizard"), QLatin1String("dhdev@gmx.de"));
- aboutData.addAuthor (i18n("Waldo Bastian"), i18n("The cool buffersystem"), QLatin1String("bastian@kde.org") );
- aboutData.addAuthor (i18n("Charles Samuels"), i18n("The Editing Commands"), QLatin1String("charles@kde.org"));
- aboutData.addAuthor (i18n("Matt Newell"), i18n("Testing, ..."), QLatin1String("newellm@proaxis.com"));
- aboutData.addAuthor (i18n("Michael Bartl"), i18n("Former Core Developer"), QLatin1String("michael.bartl1@chello.at"));
- aboutData.addAuthor (i18n("Michael McCallum"), i18n("Core Developer"), QLatin1String("gholam@xtra.co.nz"));
- aboutData.addAuthor (i18n("Jochen Wilhemly"), i18n("KWrite Author"), QLatin1String("digisnap@cs.tu-berlin.de") );
- aboutData.addAuthor (i18n("Michael Koch"), i18n("KWrite port to KParts"), QLatin1String("koch@kde.org"));
- aboutData.addAuthor (i18n("Christian Gebauer"), QString(), QLatin1String("gebauer@kde.org") );
- aboutData.addAuthor (i18n("Simon Hausmann"), QString(), QLatin1String("hausmann@kde.org") );
- aboutData.addAuthor (i18n("Glen Parker"), i18n("KWrite Undo History, Kspell integration"), QLatin1String("glenebob@nwlink.com"));
- aboutData.addAuthor (i18n("Scott Manson"), i18n("KWrite XML Syntax highlighting support"), QLatin1String("sdmanson@alltel.net"));
- aboutData.addAuthor (i18n("John Firebaugh"), i18n("Patches and more"), QLatin1String("jfirebaugh@kde.org"));
- aboutData.addAuthor (i18n("Pablo Martín"), i18n("Python Plugin Developer"), QLatin1String("goinnn@gmail.com"), QLatin1String("http://github.com/goinnn/"));
- aboutData.addAuthor (i18n("Gerald Senarclens de Grancy"), i18n("QA and Scripting"), QLatin1String("oss@senarclens.eu"), QLatin1String("http://find-santa.eu/"));
-
- aboutData.addCredit (i18n("Matteo Merli"), i18n("Highlighting for RPM Spec-Files, Perl, Diff and more"), QLatin1String("merlim@libero.it"));
- aboutData.addCredit (i18n("Rocky Scaletta"), i18n("Highlighting for VHDL"), QLatin1String("rocky@purdue.edu"));
+ aboutData.addAuthor (i18n("Christoph Cullmann"), i18n("Maintainer"), QStringLiteral("cullmann@kde.org"), QStringLiteral("http://www.cullmann.io"));
+ aboutData.addAuthor (i18n("Anders Lund"), i18n("Core Developer"), QStringLiteral("anders@alweb.dk"), QStringLiteral("http://www.alweb.dk"));
+ aboutData.addAuthor (i18n("Joseph Wenninger"), i18n("Core Developer"), QStringLiteral("jowenn@kde.org"), QStringLiteral("http://stud3.tuwien.ac.at/~e9925371"));
+ aboutData.addAuthor (i18n("Hamish Rodda"), i18n("Core Developer"), QStringLiteral("rodda@kde.org"));
+ aboutData.addAuthor (i18n("Dominik Haumann"), i18n("Developer & Highlight wizard"), QStringLiteral("dhdev@gmx.de"));
+ aboutData.addAuthor (i18n("Waldo Bastian"), i18n("The cool buffersystem"), QStringLiteral("bastian@kde.org") );
+ aboutData.addAuthor (i18n("Charles Samuels"), i18n("The Editing Commands"), QStringLiteral("charles@kde.org"));
+ aboutData.addAuthor (i18n("Matt Newell"), i18n("Testing, ..."), QStringLiteral("newellm@proaxis.com"));
+ aboutData.addAuthor (i18n("Michael Bartl"), i18n("Former Core Developer"), QStringLiteral("michael.bartl1@chello.at"));
+ aboutData.addAuthor (i18n("Michael McCallum"), i18n("Core Developer"), QStringLiteral("gholam@xtra.co.nz"));
+ aboutData.addAuthor (i18n("Jochen Wilhemly"), i18n("KWrite Author"), QStringLiteral("digisnap@cs.tu-berlin.de") );
+ aboutData.addAuthor (i18n("Michael Koch"), i18n("KWrite port to KParts"), QStringLiteral("koch@kde.org"));
+ aboutData.addAuthor (i18n("Christian Gebauer"), QString(), QStringLiteral("gebauer@kde.org") );
+ aboutData.addAuthor (i18n("Simon Hausmann"), QString(), QStringLiteral("hausmann@kde.org") );
+ aboutData.addAuthor (i18n("Glen Parker"), i18n("KWrite Undo History, Kspell integration"), QStringLiteral("glenebob@nwlink.com"));
+ aboutData.addAuthor (i18n("Scott Manson"), i18n("KWrite XML Syntax highlighting support"), QStringLiteral("sdmanson@alltel.net"));
+ aboutData.addAuthor (i18n("John Firebaugh"), i18n("Patches and more"), QStringLiteral("jfirebaugh@kde.org"));
+ aboutData.addAuthor (i18n("Pablo Martín"), i18n("Python Plugin Developer"), QStringLiteral("goinnn@gmail.com"), QStringLiteral("http://github.com/goinnn/"));
+ aboutData.addAuthor (i18n("Gerald Senarclens de Grancy"), i18n("QA and Scripting"), QStringLiteral("oss@senarclens.eu"), QStringLiteral("http://find-santa.eu/"));
+
+ aboutData.addCredit (i18n("Matteo Merli"), i18n("Highlighting for RPM Spec-Files, Perl, Diff and more"), QStringLiteral("merlim@libero.it"));
+ aboutData.addCredit (i18n("Rocky Scaletta"), i18n("Highlighting for VHDL"), QStringLiteral("rocky@purdue.edu"));
aboutData.addCredit (i18n("Yury Lebedev"), i18n("Highlighting for SQL"));
aboutData.addCredit (i18n("Chris Ross"), i18n("Highlighting for Ferite"));
aboutData.addCredit (i18n("Nick Roux"), i18n("Highlighting for ILERPG"));
@@ -149,47 +149,47 @@ extern "C" Q_DECL_EXPORT int kdemain( int argc, char **argv )
parser.addVersionOption ();
// -s/--start session option
- const QCommandLineOption startSessionOption (QStringList () << QLatin1String("s") << QLatin1String("start"), i18n("Start Kate with a given session."), QLatin1String("session"));
+ const QCommandLineOption startSessionOption (QStringList () << QStringLiteral("s") << QStringLiteral("start"), i18n("Start Kate with a given session."), QStringLiteral("session"));
parser.addOption (startSessionOption);
// --startanon session option
- const QCommandLineOption startAnonymousSessionOption (QStringList () << QLatin1String("startanon"), i18n("Start Kate with a new anonymous session, implies '-n'."));
+ const QCommandLineOption startAnonymousSessionOption (QStringList () << QStringLiteral("startanon"), i18n("Start Kate with a new anonymous session, implies '-n'."));
parser.addOption (startAnonymousSessionOption);
// -n/--new option
- const QCommandLineOption startNewInstanceOption (QStringList () << QLatin1String("n") << QLatin1String("new"), i18n("Force start of a new kate instance (is ignored if start is used and another kate instance already has the given session opened), forced if no parameters and no URLs are given at all."));
+ const QCommandLineOption startNewInstanceOption (QStringList () << QStringLiteral("n") << QStringLiteral("new"), i18n("Force start of a new kate instance (is ignored if start is used and another kate instance already has the given session opened), forced if no parameters and no URLs are given at all."));
parser.addOption (startNewInstanceOption);
// -b/--block option
- const QCommandLineOption startBlockingOption (QStringList () << QLatin1String("b") << QLatin1String("block"), i18n("If using an already running kate instance, block until it exits, if URLs given to open."));
+ const QCommandLineOption startBlockingOption (QStringList () << QStringLiteral("b") << QStringLiteral("block"), i18n("If using an already running kate instance, block until it exits, if URLs given to open."));
parser.addOption (startBlockingOption);
// -p/--pid option
- const QCommandLineOption usePidOption (QStringList () << QLatin1String("p") << QLatin1String("pid"), i18n("Only try to reuse kate instance with this pid (is ignored if start is used and another kate instance already has the given session opened)."), QLatin1String("pid"));
+ const QCommandLineOption usePidOption (QStringList () << QStringLiteral("p") << QStringLiteral("pid"), i18n("Only try to reuse kate instance with this pid (is ignored if start is used and another kate instance already has the given session opened)."), QStringLiteral("pid"));
parser.addOption (usePidOption);
// -e/--encoding option
- const QCommandLineOption useEncodingOption (QStringList () << QLatin1String("e") << QLatin1String("encoding"), i18n("Set encoding for the file to open."), QLatin1String("encoding"));
+ const QCommandLineOption useEncodingOption (QStringList () << QStringLiteral("e") << QStringLiteral("encoding"), i18n("Set encoding for the file to open."), QStringLiteral("encoding"));
parser.addOption (useEncodingOption);
// -l/--line option
- const QCommandLineOption gotoLineOption (QStringList () << QLatin1String("l") << QLatin1String("line"), i18n("Navigate to this line."), QLatin1String("line"));
+ const QCommandLineOption gotoLineOption (QStringList () << QStringLiteral("l") << QStringLiteral("line"), i18n("Navigate to this line."), QStringLiteral("line"));
parser.addOption (gotoLineOption);
// -c/--column option
- const QCommandLineOption gotoColumnOption (QStringList () << QLatin1String("c") << QLatin1String("column"), i18n("Navigate to this column."), QLatin1String("column"));
+ const QCommandLineOption gotoColumnOption (QStringList () << QStringLiteral("c") << QStringLiteral("column"), i18n("Navigate to this column."), QStringLiteral("column"));
parser.addOption (gotoColumnOption);
// -i/--stdin option
- const QCommandLineOption readStdInOption (QStringList () << QLatin1String("i") << QLatin1String("stdin"), i18n("Read the contents of stdin."));
+ const QCommandLineOption readStdInOption (QStringList () << QStringLiteral("i") << QStringLiteral("stdin"), i18n("Read the contents of stdin."));
parser.addOption (readStdInOption);
// --tempfile option
- const QCommandLineOption tempfileOption (QStringList () << QLatin1String("tempfile"), i18n("The files/URLs opened by the application will be deleted after use"));
+ const QCommandLineOption tempfileOption (QStringList () << QStringLiteral("tempfile"), i18n("The files/URLs opened by the application will be deleted after use"));
parser.addOption (tempfileOption);
// urls to open
- parser.addPositionalArgument(QLatin1String("urls"), i18n("Documents to open."), QLatin1String("[urls...]"));
+ parser.addPositionalArgument(QStringLiteral("urls"), i18n("Documents to open."), QStringLiteral("[urls...]"));
/**
* do the command line parsing
@@ -256,7 +256,7 @@ extern "C" Q_DECL_EXPORT int kdemain( int argc, char **argv )
parser.value(usePidOption) :
QString::fromLocal8Bit(qgetenv("KATE_PID"));
- serviceName = QLatin1String("org.kde.kate-") + usePid;
+ serviceName = QStringLiteral("org.kde.kate-") + usePid;
if (!kateServices.contains(serviceName)) serviceName.clear();
}
}
@@ -283,7 +283,7 @@ extern "C" Q_DECL_EXPORT int kdemain( int argc, char **argv )
if (parser.isSet(startSessionOption) && (!session_already_opened) )
{
QDBusMessage m = QDBusMessage::createMethodCall (serviceName,
- QLatin1String("/MainApplication"), QLatin1String("org.kde.Kate.Application"), QLatin1String("activateSession"));
+ QStringLiteral("/MainApplication"), QStringLiteral("org.kde.Kate.Application"), QStringLiteral("activateSession"));
QList<QVariant> dbusargs;
dbusargs.append(parser.value(startSessionOption));
@@ -305,12 +305,12 @@ extern "C" Q_DECL_EXPORT int kdemain( int argc, char **argv )
foreach(const QString &url, urls)
{
QDBusMessage m = QDBusMessage::createMethodCall (serviceName,
- QLatin1String("/MainApplication"), QLatin1String("org.kde.Kate.Application"), QLatin1String("tokenOpenUrl"));
+ QStringLiteral("/MainApplication"), QStringLiteral("org.kde.Kate.Application"), QStringLiteral("tokenOpenUrl"));
QList<QVariant> dbusargs;
// convert to an url
- QRegExp withProtocol(QLatin1String("^[a-zA-Z]+:")); // TODO: remove after Qt supports this on its own
+ QRegExp withProtocol(QStringLiteral("^[a-zA-Z]+:")); // TODO: remove after Qt supports this on its own
if (withProtocol.indexIn(url) == 0) {
dbusargs.append(QUrl::fromUserInput(url));
} else {
@@ -331,7 +331,7 @@ extern "C" Q_DECL_EXPORT int kdemain( int argc, char **argv )
if (v.isValid())
{
QString s=v.toString();
- if ((!s.isEmpty()) && (s != QLatin1String("ERROR")))
+ if ((!s.isEmpty()) && (s != QStringLiteral("ERROR")))
{
tokens<<s;
}
@@ -362,7 +362,7 @@ extern "C" Q_DECL_EXPORT int kdemain( int argc, char **argv )
while( !line.isNull() );
QDBusMessage m = QDBusMessage::createMethodCall (serviceName,
- QLatin1String("/MainApplication"), QLatin1String("org.kde.Kate.Application"), QLatin1String("openInput"));
+ QStringLiteral("/MainApplication"), QStringLiteral("org.kde.Kate.Application"), QStringLiteral("openInput"));
QList<QVariant> dbusargs;
dbusargs.append(text);
@@ -390,7 +390,7 @@ extern "C" Q_DECL_EXPORT int kdemain( int argc, char **argv )
if (nav)
{
QDBusMessage m = QDBusMessage::createMethodCall (serviceName,
- QLatin1String("/MainApplication"), QLatin1String("org.kde.Kate.Application"), QLatin1String("setCursor"));
+ QStringLiteral("/MainApplication"), QStringLiteral("org.kde.Kate.Application"), QStringLiteral("setCursor"));
QList<QVariant> args;
args.append(line);
@@ -402,14 +402,14 @@ extern "C" Q_DECL_EXPORT int kdemain( int argc, char **argv )
// activate the used instance
QDBusMessage activateMsg = QDBusMessage::createMethodCall (serviceName,
- QLatin1String("/MainApplication"), QLatin1String("org.kde.Kate.Application"), QLatin1String("activate"));
+ QStringLiteral("/MainApplication"), QStringLiteral("org.kde.Kate.Application"), QStringLiteral("activate"));
QDBusConnection::sessionBus().call (activateMsg);
// connect dbus signal
if (needToBlock) {
KateWaiter *waiter = new KateWaiter (&app, serviceName,tokens);
- QDBusConnection::sessionBus().connect(serviceName, QLatin1String("/MainApplication"), QLatin1String("org.kde.Kate.Application"), QLatin1String("exiting"), waiter, SLOT(exiting()));
- QDBusConnection::sessionBus().connect(serviceName, QLatin1String("/MainApplication"), QLatin1String("org.kde.Kate.Application"), QLatin1String("documentClosed"), waiter, SLOT(documentClosed(QString)));
+ QDBusConnection::sessionBus().connect(serviceName, QStringLiteral("/MainApplication"), QStringLiteral("org.kde.Kate.Application"), QStringLiteral("exiting"), waiter, SLOT(exiting()));
+ QDBusConnection::sessionBus().connect(serviceName, QStringLiteral("/MainApplication"), QStringLiteral("org.kde.Kate.Application"), QStringLiteral("documentClosed"), waiter, SLOT(documentClosed(QString)));
}
#ifdef Q_WS_X11
diff --git a/kate/session/katesessionchooser.cpp b/kate/session/katesessionchooser.cpp
index a1794cb..9b16ab3 100644
--- a/kate/session/katesessionchooser.cpp
+++ b/kate/session/katesessionchooser.cpp
@@ -87,7 +87,7 @@ KateSessionChooser::KateSessionChooser (QWidget *parent, const QString &lastSess
connect(cancelButton, SIGNAL(clicked()), this, SLOT(slotCancel()));
buttonBox->addButton(cancelButton, QDialogButtonBox::RejectRole);
- m_openButton = new QPushButton(QIcon::fromTheme(QLatin1String("document-open")), i18n("Open Session"));
+ m_openButton = new QPushButton(QIcon::fromTheme(QStringLiteral("document-open")), i18n("Open Session"));
m_openButton->setEnabled(m_sessions->currentIndex().isValid());
m_openButton->setDefault(true);
m_openButton->setFocus();
@@ -99,7 +99,7 @@ KateSessionChooser::KateSessionChooser (QWidget *parent, const QString &lastSess
QAction *a = popup->addAction(i18n("Use selected session as template"));
connect(a, SIGNAL(triggered()), this, SLOT(slotCopySession()));
- QPushButton *newButton = new QPushButton(QIcon::fromTheme(QLatin1String("document-new")), i18n("New Session"));
+ QPushButton *newButton = new QPushButton(QIcon::fromTheme(QStringLiteral("document-new")), i18n("New Session"));
buttonBox->addButton(newButton, QDialogButtonBox::ActionRole);
connect(newButton, SIGNAL(clicked()), this, SLOT(slotNew()));
diff --git a/kate/session/katesessionmanagedialog.cpp b/kate/session/katesessionmanagedialog.cpp
index 4c1768c..9866ae3 100644
--- a/kate/session/katesessionmanagedialog.cpp
+++ b/kate/session/katesessionmanagedialog.cpp
@@ -89,7 +89,7 @@ KateSessionManageDialog::KateSessionManageDialog (QWidget *parent)
bottomButtons->addButton(closeButton, QDialogButtonBox::RejectRole);
connect(closeButton, SIGNAL(clicked()), this, SLOT(slotClose()));
- m_openButton = new QPushButton(QIcon::fromTheme(QLatin1String("document-open")), i18n("&Open"));
+ m_openButton = new QPushButton(QIcon::fromTheme(QStringLiteral("document-open")), i18n("&Open"));
bottomButtons->addButton(m_openButton, QDialogButtonBox::AcceptRole);
connect(m_openButton, SIGNAL(clicked()), this, SLOT(open()));
diff --git a/kate/session/katesessionmanager.cpp b/kate/session/katesessionmanager.cpp
index bd021f1..3b3debe 100644
--- a/kate/session/katesessionmanager.cpp
+++ b/kate/session/katesessionmanager.cpp
@@ -51,7 +51,7 @@ KateSessionManager::KateSessionManager (QObject *parent, const QString &sessions
: QObject (parent)
{
if (sessionsDir.isEmpty()) {
- m_sessionsDir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/kate/sessions");
+ m_sessionsDir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/kate/sessions");
} else {
m_sessionsDir = sessionsDir;
}
@@ -83,7 +83,7 @@ void KateSessionManager::updateSessionList()
QStringList list;
// Let's get a list of all session we have atm
- QDir dir (m_sessionsDir, QLatin1String("*.katesession"));
+ QDir dir (m_sessionsDir, QStringLiteral("*.katesession"));
for (unsigned int i = 0; i < dir.count(); ++i) {
QString name = dir[i];
@@ -133,9 +133,9 @@ bool KateSessionManager::activateSession (KateSession::Ptr session,
if (instances.contains(session->name()))
{
if (KMessageBox::questionYesNo(0,i18n("Session '%1' is already opened in another kate instance, change there instead of reopening?",session->name()),
- QString(),KStandardGuiItem::yes(),KStandardGuiItem::no(),QLatin1String("katesessionmanager_switch_instance"))==KMessageBox::Yes)
+ QString(),KStandardGuiItem::yes(),KStandardGuiItem::no(),QStringLiteral("katesessionmanager_switch_instance"))==KMessageBox::Yes)
{
- instances[session->name()]->dbus_if->call(QLatin1String("activate"));
+ instances[session->name()]->dbus_if->call(QStringLiteral("activate"));
cleanupRunningKateAppInstanceMap(&instances);
return false;
}
@@ -364,13 +364,13 @@ bool KateSessionManager::chooseSession ()
const QString sesStart (c.readEntry ("Startup Session", "manual"));
// uhh, just open last used session, show no chooser
- if (sesStart == QLatin1String("last")) {
+ if (sesStart == QStringLiteral("last")) {
activateSession(lastSession, false);
return true;
}
// start with empty new session or in case no sessions exist
- if (sesStart == QLatin1String("new") || sessionList().size() == 0) {
+ if (sesStart == QStringLiteral("new") || sessionList().size() == 0) {
activateAnonymousSession();
return true;
}
@@ -406,7 +406,7 @@ bool KateSessionManager::chooseSession ()
// write back our nice boolean :)
if (success && chooser->reopenLastSession())
{
- KConfigGroup generalConfig(KSharedConfig::openConfig(), QLatin1String("General"));
+ KConfigGroup generalConfig(KSharedConfig::openConfig(), QStringLiteral("General"));
if (res == KateSessionChooser::resultOpen) {
generalConfig.writeEntry ("Startup Session", "last");
@@ -500,7 +500,7 @@ void KateSessionManager::sessionManage ()
QString KateSessionManager::anonymousSessionFile() const
{
- const QString file = m_sessionsDir + QLatin1String("/../anonymous.katesession");
+ const QString file = m_sessionsDir + QStringLiteral("/../anonymous.katesession");
return QDir().cleanPath(file);
}
@@ -508,7 +508,7 @@ QString KateSessionManager::sessionFileForName(const QString &name) const
{
Q_ASSERT(!name.isEmpty());
const QString sname = QString::fromLatin1(QUrl::toPercentEncoding(name, QByteArray(), QByteArray(".")));
- return m_sessionsDir + QLatin1String("/") + sname + QLatin1String(".katesession");
+ return m_sessionsDir + QStringLiteral("/") + sname + QStringLiteral(".katesession");
}
KateSessionList KateSessionManager::sessionList()
diff --git a/kate/session/katesessionopendialog.cpp b/kate/session/katesessionopendialog.cpp
index e7eb0b8..83f4251 100644
--- a/kate/session/katesessionopendialog.cpp
+++ b/kate/session/katesessionopendialog.cpp
@@ -76,7 +76,7 @@ KateSessionOpenDialog::KateSessionOpenDialog (QWidget *parent)
connect(cancelButton, SIGNAL(clicked()), this, SLOT(slotCanceled()));
buttons->addButton(cancelButton, QDialogButtonBox::RejectRole);
- m_openButton = new QPushButton(QIcon::fromTheme(QLatin1String("document-open")), i18n("&Open"));
+ m_openButton = new QPushButton(QIcon::fromTheme(QStringLiteral("document-open")), i18n("&Open"));
m_openButton->setDefault(true);
m_openButton->setEnabled(false);
connect(m_openButton, SIGNAL(clicked()), this, SLOT(slotOpen()));
diff --git a/kate/session/katesessionsaction.cpp b/kate/session/katesessionsaction.cpp
index 4c92a01..fddf391 100644
--- a/kate/session/katesessionsaction.cpp
+++ b/kate/session/katesessionsaction.cpp
@@ -55,7 +55,7 @@ void KateSessionsAction::slotAboutToShow()
foreach(const KateSession::Ptr &session, slist) {
QString sessionName = session->name();
- sessionName.replace(QLatin1String("&"), QLatin1String("&&"));
+ sessionName.replace(QStringLiteral("&"), QStringLiteral("&&"));
QAction *action = new QAction(sessionName, sessionsGroup);
action->setData(QVariant(session->name()));
menu()->addAction(action);
diff --git a/kwrite/kwrite.cpp b/kwrite/kwrite.cpp
index 15502fe..a2d5776 100644
--- a/kwrite/kwrite.cpp
+++ b/kwrite/kwrite.cpp
@@ -101,7 +101,7 @@ KWrite::KWrite (KTextEditor::Document *doc)
setAcceptDrops(true);
connect(m_view,SIGNAL(dropEventPass(QDropEvent*)),this,SLOT(slotDropEvent(QDropEvent*)));
- setXMLFile(QLatin1String("kwriteui.rc"));
+ setXMLFile(QStringLiteral("kwriteui.rc"));
createShellGUI( true );
guiFactory()->addClient( m_view );
@@ -111,7 +111,7 @@ KWrite::KWrite (KTextEditor::Document *doc)
*/
// FIXME: make sure the config dir exists, any idea how to do it more cleanly?
- QDir(QStandardPaths::writableLocation(QStandardPaths::DataLocation)).mkpath(QLatin1String("."));
+ QDir(QStandardPaths::writableLocation(QStandardPaths::DataLocation)).mkpath(QStringLiteral("."));
// call it as last thing, must be sure everything is already set up ;)
setAutoSaveSettings ();
@@ -147,21 +147,21 @@ KWrite::~KWrite()
void KWrite::setupActions()
{
- actionCollection()->addAction( KStandardAction::Close, QLatin1String("file_close"), this, SLOT(slotFlush()) )
+ actionCollection()->addAction( KStandardAction::Close, QStringLiteral("file_close"), this, SLOT(slotFlush()) )
->setWhatsThis(i18n("Use this command to close the current document"));
// setup File menu
- actionCollection()->addAction( KStandardAction::New, QLatin1String("file_new"), this, SLOT(slotNew()) )
+ actionCollection()->addAction( KStandardAction::New, QStringLiteral("file_new"), this, SLOT(slotNew()) )
->setWhatsThis(i18n("Use this command to create a new document"));
- actionCollection()->addAction( KStandardAction::Open, QLatin1String("file_open"), this, SLOT(slotOpen()) )
+ actionCollection()->addAction( KStandardAction::Open, QStringLiteral("file_open"), this, SLOT(slotOpen()) )
->setWhatsThis(i18n("Use this command to open an existing document for editing"));
m_recentFiles = KStandardAction::openRecent(this, SLOT(slotOpen(QUrl)), this);
actionCollection()->addAction(m_recentFiles->objectName(), m_recentFiles);
m_recentFiles->setWhatsThis(i18n("This lists files which you have opened recently, and allows you to easily open them again."));
- QAction *a = actionCollection()->addAction( QLatin1String("view_new_view") );
- a->setIcon( QIcon::fromTheme(QLatin1String("window-new")) );
+ QAction *a = actionCollection()->addAction( QStringLiteral("view_new_view") );
+ a->setIcon( QIcon::fromTheme(QStringLiteral("window-new")) );
a->setText( i18n("&New Window") );
connect( a, SIGNAL(triggered()), this, SLOT(newView()) );
a->setWhatsThis(i18n("Create another view containing the current document"));
@@ -173,22 +173,22 @@ void KWrite::setupActions()
setStandardToolBarMenuEnabled(true);
m_paShowStatusBar = KStandardAction::showStatusbar(this, SLOT(toggleStatusBar()), this);
- actionCollection()->addAction( QLatin1String("settings_show_statusbar"), m_paShowStatusBar);
+ actionCollection()->addAction( QStringLiteral("settings_show_statusbar"), m_paShowStatusBar);
m_paShowStatusBar->setWhatsThis(i18n("Use this command to show or hide the view's statusbar"));
m_paShowPath = new KToggleAction( i18n("Sho&w Path"), this );
- actionCollection()->addAction( QLatin1String("set_showPath"), m_paShowPath );
+ actionCollection()->addAction( QStringLiteral("set_showPath"), m_paShowPath );
connect( m_paShowPath, SIGNAL(triggered()), this, SLOT(documentNameChanged()) );
m_paShowPath->setWhatsThis(i18n("Show the complete document path in the window caption"));
a= actionCollection()->addAction( KStandardAction::KeyBindings, this, SLOT(editKeys()) );
a->setWhatsThis(i18n("Configure the application's keyboard shortcut assignments."));
- a = actionCollection()->addAction( KStandardAction::ConfigureToolbars, QLatin1String("options_configure_toolbars"),
+ a = actionCollection()->addAction( KStandardAction::ConfigureToolbars, QStringLiteral("options_configure_toolbars"),
this, SLOT(editToolbars()) );
a->setWhatsThis(i18n("Configure which items should appear in the toolbar(s)."));
- a = actionCollection()->addAction( QLatin1String("help_about_editor") );
+ a = actionCollection()->addAction( QStringLiteral("help_about_editor") );
a->setText( i18n("&About Editor Component") );
connect( a, SIGNAL(triggered()), this, SLOT(aboutEditor()) );
@@ -442,7 +442,7 @@ void KWrite::readProperties(const KConfigGroup &config)
readConfig();
if (KTextEditor::SessionConfigInterface *iface = qobject_cast<KTextEditor::SessionConfigInterface *>(m_view))
- iface->readSessionConfig(KConfigGroup(&config, QLatin1String("General Options")));
+ iface->readSessionConfig(KConfigGroup(&config, QStringLiteral("General Options")));
}
void KWrite::saveProperties(KConfigGroup &config)
@@ -452,7 +452,7 @@ void KWrite::saveProperties(KConfigGroup &config)
config.writeEntry("DocumentNumber",docList.indexOf(m_view->document()) + 1);
if (KTextEditor::SessionConfigInterface *iface = qobject_cast<KTextEditor::SessionConfigInterface *>(m_view)) {
- KConfigGroup cg(&config, QLatin1String("General Options"));
+ KConfigGroup cg(&config, QStringLiteral("General Options"));
iface->writeSessionConfig(cg);
}
}
@@ -568,7 +568,7 @@ void KWrite::modifiedChanged()
bool mod = m_view->document()->isModified();
if (mod && m_modPm.isNull()) {
- m_modPm = QIcon::fromTheme(QLatin1String("document-properties")).pixmap(16);
+ m_modPm = QIcon::fromTheme(QStringLiteral("document-properties")).pixmap(16);
}
/* const KateDocumentInfo *info
@@ -609,7 +609,7 @@ void KWrite::documentNameChanged ()
//File name shouldn't be too long - Maciek
if (c.length() > 64)
- c = c.left(64) + QLatin1String("...");
+ c = c.left(64) + QStringLiteral("...");
}
else
{
@@ -617,7 +617,7 @@ void KWrite::documentNameChanged ()
//File name shouldn't be too long - Maciek
if (c.length() > 64)
- c = QLatin1String("...") + c.right(64);
+ c = QStringLiteral("...") + c.right(64);
}
setCaption (c+readOnlyCaption, m_view->document()->isModified());
diff --git a/kwrite/main.cpp b/kwrite/main.cpp
index 09a385d..5f82996 100644
--- a/kwrite/main.cpp
+++ b/kwrite/main.cpp
@@ -37,38 +37,38 @@
extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
{
- KAboutData aboutData ( QLatin1String("kwrite"), QString(),
+ KAboutData aboutData ( QStringLiteral("kwrite"), QString(),
i18n("KWrite"),
- QLatin1String(KATE_VERSION),
+ QStringLiteral(KATE_VERSION),
i18n( "KWrite - Text Editor" ), KAboutData::License_LGPL_V2,
- i18n( "(c) 2000-2014 The Kate Authors" ), QString(), QLatin1String("http://kate-editor.org") );
+ i18n( "(c) 2000-2014 The Kate Authors" ), QString(), QStringLiteral("http://kate-editor.org") );
/**
* right dbus prefix == org.kde.
*/
aboutData.setOrganizationDomain (QByteArray("kde.org"));
- aboutData.addAuthor (i18n("Christoph Cullmann"), i18n("Maintainer"), QLatin1String("cullmann@kde.org"), QLatin1String("http://www.cullmann.io"));
- aboutData.addAuthor (i18n("Anders Lund"), i18n("Core Developer"), QLatin1String("anders@alweb.dk"), QLatin1String("http://www.alweb.dk"));
- aboutData.addAuthor (i18n("Joseph Wenninger"), i18n("Core Developer"), QLatin1String("jowenn@kde.org"), QLatin1String("http://stud3.tuwien.ac.at/~e9925371"));
- aboutData.addAuthor (i18n("Hamish Rodda"),i18n("Core Developer"), QLatin1String("rodda@kde.org"));
- aboutData.addAuthor (i18n("Dominik Haumann"), i18n("Developer & Highlight wizard"), QLatin1String("dhdev@gmx.de"));
- aboutData.addAuthor (i18n("Waldo Bastian"), i18n("The cool buffersystem"), QLatin1String("bastian@kde.org") );
- aboutData.addAuthor (i18n("Charles Samuels"), i18n("The Editing Commands"), QLatin1String("charles@kde.org"));
- aboutData.addAuthor (i18n("Matt Newell"), i18nc("Credit text for someone that did testing and some other similar things", "Testing, ..."), QLatin1String("newellm@proaxis.com"));
- aboutData.addAuthor (i18n("Michael Bartl"), i18n("Former Core Developer"), QLatin1String("michael.bartl1@chello.at"));
- aboutData.addAuthor (i18n("Michael McCallum"), i18n("Core Developer"), QLatin1String("gholam@xtra.co.nz"));
- aboutData.addAuthor (i18n("Jochen Wilhemly"), i18n("KWrite Author"), QLatin1String("digisnap@cs.tu-berlin.de") );
- aboutData.addAuthor (i18n("Michael Koch"),i18n("KWrite port to KParts"), QLatin1String("koch@kde.org"));
- aboutData.addAuthor (i18n("Christian Gebauer"), QString(), QLatin1String("gebauer@kde.org") );
- aboutData.addAuthor (i18n("Simon Hausmann"), QString(), QLatin1String("hausmann@kde.org") );
- aboutData.addAuthor (i18n("Glen Parker"),i18n("KWrite Undo History, Kspell integration"), QLatin1String("glenebob@nwlink.com"));
- aboutData.addAuthor (i18n("Scott Manson"),i18n("KWrite XML Syntax highlighting support"), QLatin1String("sdmanson@alltel.net"));
- aboutData.addAuthor (i18n("John Firebaugh"),i18n("Patches and more"), QLatin1String("jfirebaugh@kde.org"));
- aboutData.addAuthor (i18n("Gerald Senarclens de Grancy"), i18n("QA and Scripting"), QLatin1String("oss@senarclens.eu"), QLatin1String("http://find-santa.eu/"));
-
- aboutData.addCredit (i18n("Matteo Merli"),i18n("Highlighting for RPM Spec-Files, Perl, Diff and more"), QLatin1String("merlim@libero.it"));
- aboutData.addCredit (i18n("Rocky Scaletta"),i18n("Highlighting for VHDL"), QLatin1String("rocky@purdue.edu"));
+ aboutData.addAuthor (i18n("Christoph Cullmann"), i18n("Maintainer"), QStringLiteral("cullmann@kde.org"), QStringLiteral("http://www.cullmann.io"));
+ aboutData.addAuthor (i18n("Anders Lund"), i18n("Core Developer"), QStringLiteral("anders@alweb.dk"), QStringLiteral("http://www.alweb.dk"));
+ aboutData.addAuthor (i18n("Joseph Wenninger"), i18n("Core Developer"), QStringLiteral("jowenn@kde.org"), QStringLiteral("http://stud3.tuwien.ac.at/~e9925371"));
+ aboutData.addAuthor (i18n("Hamish Rodda"),i18n("Core Developer"), QStringLiteral("rodda@kde.org"));
+ aboutData.addAuthor (i18n("Dominik Haumann"), i18n("Developer & Highlight wizard"), QStringLiteral("dhdev@gmx.de"));
+ aboutData.addAuthor (i18n("Waldo Bastian"), i18n("The cool buffersystem"), QStringLiteral("bastian@kde.org") );
+ aboutData.addAuthor (i18n("Charles Samuels"), i18n("The Editing Commands"), QStringLiteral("charles@kde.org"));
+ aboutData.addAuthor (i18n("Matt Newell"), i18nc("Credit text for someone that did testing and some other similar things", "Testing, ..."), QStringLiteral("newellm@proaxis.com"));
+ aboutData.addAuthor (i18n("Michael Bartl"), i18n("Former Core Developer"), QStringLiteral("michael.bartl1@chello.at"));
+ aboutData.addAuthor (i18n("Michael McCallum"), i18n("Core Developer"), QStringLiteral("gholam@xtra.co.nz"));
+ aboutData.addAuthor (i18n("Jochen Wilhemly"), i18n("KWrite Author"), QStringLiteral("digisnap@cs.tu-berlin.de") );
+ aboutData.addAuthor (i18n("Michael Koch"),i18n("KWrite port to KParts"), QStringLiteral("koch@kde.org"));
+ aboutData.addAuthor (i18n("Christian Gebauer"), QString(), QStringLiteral("gebauer@kde.org") );
+ aboutData.addAuthor (i18n("Simon Hausmann"), QString(), QStringLiteral("hausmann@kde.org") );
+ aboutData.addAuthor (i18n("Glen Parker"),i18n("KWrite Undo History, Kspell integration"), QStringLiteral("glenebob@nwlink.com"));
+ aboutData.addAuthor (i18n("Scott Manson"),i18n("KWrite XML Syntax highlighting support"), QStringLiteral("sdmanson@alltel.net"));
+ aboutData.addAuthor (i18n("John Firebaugh"),i18n("Patches and more"), QStringLiteral("jfirebaugh@kde.org"));
+ aboutData.addAuthor (i18n("Gerald Senarclens de Grancy"), i18n("QA and Scripting"), QStringLiteral("oss@senarclens.eu"), QStringLiteral("http://find-santa.eu/"));
+
+ aboutData.addCredit (i18n("Matteo Merli"),i18n("Highlighting for RPM Spec-Files, Perl, Diff and more"), QStringLiteral("merlim@libero.it"));
+ aboutData.addCredit (i18n("Rocky Scaletta"),i18n("Highlighting for VHDL"), QStringLiteral("rocky@purdue.edu"));
aboutData.addCredit (i18n("Yury Lebedev"),i18n("Highlighting for SQL"));
aboutData.addCredit (i18n("Chris Ross"),i18n("Highlighting for Ferite"));
aboutData.addCredit (i18n("Nick Roux"),i18n("Highlighting for ILERPG"));
@@ -81,7 +81,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
aboutData.addCredit (i18n("Carsten Pfeiffer"), i18nc("Credit text for someone that helped a lot", "Very nice help"));
aboutData.addCredit (i18n("All people who have contributed and I have forgotten to mention"));
- aboutData.setProgramIconName (QLatin1String("accessories-text-editor"));
+ aboutData.setProgramIconName (QStringLiteral("accessories-text-editor"));
aboutData.setProductName(QByteArray("kate/kwrite"));
/**
@@ -108,27 +108,27 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
parser.addVersionOption();
// -e/--encoding option
- const QCommandLineOption useEncoding (QStringList () << QLatin1String("e") << QLatin1String("encoding"), i18n("Set encoding for the file to open."), QLatin1String("encoding"));
+ const QCommandLineOption useEncoding (QStringList () << QStringLiteral("e") << QStringLiteral("encoding"), i18n("Set encoding for the file to open."), QStringLiteral("encoding"));
parser.addOption (useEncoding);
// -l/--line option
- const QCommandLineOption gotoLine (QStringList () << QLatin1String("l") << QLatin1String("line"), i18n("Navigate to this line."), QLatin1String("line"));
+ const QCommandLineOption gotoLine (QStringList () << QStringLiteral("l") << QStringLiteral("line"), i18n("Navigate to this line."), QStringLiteral("line"));
parser.addOption (gotoLine);
// -c/--column option
- const QCommandLineOption gotoColumn (QStringList () << QLatin1String("c") << QLatin1String("column"), i18n("Navigate to this column."), QLatin1String("column"));
+ const QCommandLineOption gotoColumn (QStringList () << QStringLiteral("c") << QStringLiteral("column"), i18n("Navigate to this column."), QStringLiteral("column"));
parser.addOption (gotoColumn);
// -i/--stdin option
- const QCommandLineOption readStdIn (QStringList () << QLatin1String("i") << QLatin1String("stdin"), i18n("Read the contents of stdin."));
+ const QCommandLineOption readStdIn (QStringList () << QStringLiteral("i") << QStringLiteral("stdin"), i18n("Read the contents of stdin."));
parser.addOption (readStdIn);
// --tempfile option
- const QCommandLineOption tempfile (QStringList () << QLatin1String("tempfile"), i18n("The files/URLs opened by the application will be deleted after use"));
+ const QCommandLineOption tempfile (QStringList () << QStringLiteral("tempfile"), i18n("The files/URLs opened by the application will be deleted after use"));
parser.addOption (tempfile);
// urls to open
- parser.addPositionalArgument(QLatin1String("urls"), i18n("Documents to open."), QLatin1String("[urls...]"));
+ parser.addPositionalArgument(QStringLiteral("urls"), i18n("Documents to open."), QStringLiteral("[urls...]"));
/**
* do the command line parsing
@@ -147,17 +147,17 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
bool nav = false;
int line = 0, column = 0;
- QTextCodec *codec = parser.isSet(QLatin1String("encoding")) ? QTextCodec::codecForName(parser.value(QLatin1String("encoding")).toLocal8Bit()) : 0;
+ QTextCodec *codec = parser.isSet(QStringLiteral("encoding")) ? QTextCodec::codecForName(parser.value(QStringLiteral("encoding")).toLocal8Bit()) : 0;
- if (parser.isSet (QLatin1String("line")))
+ if (parser.isSet (QStringLiteral("line")))
{
- line = parser.value (QLatin1String("line")).toInt() - 1;
+ line = parser.value (QStringLiteral("line")).toInt() - 1;
nav = true;
}
- if (parser.isSet (QLatin1String("column")))
+ if (parser.isSet (QStringLiteral("column")))
{
- column = parser.value (QLatin1String("column")).toInt() - 1;
+ column = parser.value (QStringLiteral("column")).toInt() - 1;
nav = true;
}
@@ -165,7 +165,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
{
KWrite *t = new KWrite;
- if( parser.isSet( QLatin1String("stdin") ) )
+ if( parser.isSet( QStringLiteral("stdin") ) )
{
QTextStream input(stdin, QIODevice::ReadOnly);
@@ -199,7 +199,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
QUrl url;
// convert to an url
- QRegExp withProtocol(QLatin1String("^[a-zA-Z]+:")); // TODO: remove after Qt supports this on its own
+ QRegExp withProtocol(QStringLiteral("^[a-zA-Z]+:")); // TODO: remove after Qt supports this on its own
if (withProtocol.indexIn(positionalArgument) == 0) {
url = QUrl::fromUserInput(positionalArgument);
} else {