Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KDE Pim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Unmaintained
KDE Pim
Commits
8381c955
Commit
8381c955
authored
Feb 03, 2015
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
convert to QStringLiteral
parent
95c8d959
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
72 additions
and
72 deletions
+72
-72
akonadiconsole/agentwidget.cpp
akonadiconsole/agentwidget.cpp
+3
-3
akonadiconsole/main.cpp
akonadiconsole/main.cpp
+5
-5
akregator/configuration/akregator_config_appearance.cpp
akregator/configuration/akregator_config_appearance.cpp
+5
-5
akregator/src/akregator_part.cpp
akregator/src/akregator_part.cpp
+4
-4
akregator/src/articlemodel.cpp
akregator/src/articlemodel.cpp
+1
-1
blogilo/src/mainwindow.cpp
blogilo/src/mainwindow.cpp
+26
-26
blogilo/src/poststabwidget.cpp
blogilo/src/poststabwidget.cpp
+4
-4
storageservicemanager/main.cpp
storageservicemanager/main.cpp
+5
-5
storageservicemanager/storageservicelogdialog.cpp
storageservicemanager/storageservicelogdialog.cpp
+2
-2
storageservicemanager/storageservicetreewidget.cpp
storageservicemanager/storageservicetreewidget.cpp
+16
-16
templateparser/templatesinsertcommand.cpp
templateparser/templatesinsertcommand.cpp
+1
-1
No files found.
akonadiconsole/agentwidget.cpp
View file @
8381c955
...
...
@@ -254,7 +254,7 @@ void AgentWidget::showTaskList()
}
QPointer
<
TextDialog
>
dlg
=
new
TextDialog
(
this
);
dlg
->
setWindowTitle
(
Q
Latin1String
(
"Resource Task List"
));
dlg
->
setWindowTitle
(
Q
StringLiteral
(
"Resource Task List"
));
dlg
->
setText
(
txt
);
dlg
->
exec
();
delete
dlg
;
...
...
@@ -279,7 +279,7 @@ void AgentWidget::showChangeNotifications()
}
QPointer
<
TextDialog
>
dlg
=
new
TextDialog
(
this
);
dlg
->
setWindowTitle
(
Q
Latin1String
(
"Change Notification Log"
));
dlg
->
setWindowTitle
(
Q
StringLiteral
(
"Change Notification Log"
));
dlg
->
setText
(
txt
);
dlg
->
exec
();
...
...
@@ -378,7 +378,7 @@ void AgentWidget::cloneAgent(KJob *job)
qCritical
()
<<
"call to method"
<<
signature
<<
"failed: "
<<
reply
.
arguments
()
<<
reply
.
errorMessage
();
continue
;
}
const
QString
setterName
=
Q
Latin1String
(
"set"
)
+
methodName
.
at
(
0
).
toUpper
()
+
methodName
.
mid
(
1
);
const
QString
setterName
=
Q
StringLiteral
(
"set"
)
+
methodName
.
at
(
0
).
toUpper
()
+
methodName
.
mid
(
1
);
targetIface
.
call
(
setterName
,
reply
.
arguments
().
at
(
0
));
}
...
...
akonadiconsole/main.cpp
View file @
8381c955
...
...
@@ -32,9 +32,9 @@
int
main
(
int
argc
,
char
**
argv
)
{
Kdelibs4ConfigMigrator
migrate
(
Q
Latin1String
(
"akonadiconsole"
));
migrate
.
setConfigFiles
(
QStringList
()
<<
Q
Latin1String
(
"akonadiconsolerc"
));
migrate
.
setUiFiles
(
QStringList
()
<<
Q
Latin1String
(
"akonadiconsoleui.rc"
));
Kdelibs4ConfigMigrator
migrate
(
Q
StringLiteral
(
"akonadiconsole"
));
migrate
.
setConfigFiles
(
QStringList
()
<<
Q
StringLiteral
(
"akonadiconsolerc"
));
migrate
.
setUiFiles
(
QStringList
()
<<
Q
StringLiteral
(
"akonadiconsoleui.rc"
));
migrate
.
migrate
();
QApplication
app
(
argc
,
argv
);
...
...
@@ -45,7 +45,7 @@ int main(int argc, char **argv)
KAboutLicense
::
GPL
,
i18n
(
"(c) 2006-2014 the Akonadi developer"
),
QStringLiteral
(
"http://pim.kde.org/akonadi/"
));
QApplication
::
setWindowIcon
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"akonadi"
)));
QApplication
::
setWindowIcon
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"akonadi"
)));
aboutData
.
addAuthor
(
i18n
(
"Tobias König"
),
i18n
(
"Author"
),
QStringLiteral
(
"tokoe@kde.org"
));
aboutData
.
addAuthor
(
i18n
(
"Volker Krause"
),
i18n
(
"Author"
),
QStringLiteral
(
"vkrause@kde.org"
));
KAboutData
::
setApplicationData
(
aboutData
);
...
...
@@ -56,7 +56,7 @@ int main(int argc, char **argv)
aboutData
.
setupCommandLine
(
&
parser
);
parser
.
process
(
app
);
aboutData
.
processCommandLine
(
&
parser
);
parser
.
addOption
(
QCommandLineOption
(
QStringList
()
<<
Q
Latin1String
(
"remote"
),
i18n
(
"Connect to an Akonadi remote debugging server"
),
"server"
));
parser
.
addOption
(
QCommandLineOption
(
QStringList
()
<<
Q
StringLiteral
(
"remote"
),
i18n
(
"Connect to an Akonadi remote debugging server"
),
"server"
));
KDBusService
service
;
...
...
akregator/configuration/akregator_config_appearance.cpp
View file @
8381c955
...
...
@@ -55,7 +55,7 @@ KCMAkregatorAppearanceConfig::KCMAkregatorAppearanceConfig(QWidget *parent, cons
connect
(
m_ui
.
kcfg_MinimumFontSize
,
SIGNAL
(
valueChanged
(
int
)),
m_ui
.
slider_minimumFontSize
,
SLOT
(
setValue
(
int
)));
connect
(
m_ui
.
kcfg_MediumFontSize
,
SIGNAL
(
valueChanged
(
int
)),
m_ui
.
slider_mediumFontSize
,
SLOT
(
setValue
(
int
)));
KAboutData
*
about
=
new
KAboutData
(
Q
Latin1String
(
"kcmakrappearanceconfig"
),
KAboutData
*
about
=
new
KAboutData
(
Q
StringLiteral
(
"kcmakrappearanceconfig"
),
i18n
(
"Configure Feed Reader Appearance"
),
QString
(),
QString
(),
KAboutLicense
::
GPL
,
i18n
(
"(c), 2004 - 2008 Frank Osterfeld"
));
...
...
@@ -64,10 +64,10 @@ KCMAkregatorAppearanceConfig::KCMAkregatorAppearanceConfig(QWidget *parent, cons
setAboutData
(
about
);
m_ui
.
slider_minimumFontSize
->
setDisabled
(
Settings
::
self
()
->
isImmutable
(
Q
Latin1String
(
"MinimumFontSize"
)));
m_ui
.
slider_mediumFontSize
->
setDisabled
(
Settings
::
self
()
->
isImmutable
(
Q
Latin1String
(
"MediumFontSize"
)));
m_ui
.
lbl_MinimumFontSize
->
setDisabled
(
Settings
::
self
()
->
isImmutable
(
Q
Latin1String
(
"MinimumFontSize"
)));
m_ui
.
lbl_MediumFontSize
->
setDisabled
(
Settings
::
self
()
->
isImmutable
(
Q
Latin1String
(
"MediumFontSize"
)));
m_ui
.
slider_minimumFontSize
->
setDisabled
(
Settings
::
self
()
->
isImmutable
(
Q
StringLiteral
(
"MinimumFontSize"
)));
m_ui
.
slider_mediumFontSize
->
setDisabled
(
Settings
::
self
()
->
isImmutable
(
Q
StringLiteral
(
"MediumFontSize"
)));
m_ui
.
lbl_MinimumFontSize
->
setDisabled
(
Settings
::
self
()
->
isImmutable
(
Q
StringLiteral
(
"MinimumFontSize"
)));
m_ui
.
lbl_MediumFontSize
->
setDisabled
(
Settings
::
self
()
->
isImmutable
(
Q
StringLiteral
(
"MediumFontSize"
)));
addConfig
(
Settings
::
self
(),
m_widget
);
}
...
...
akregator/src/akregator_part.cpp
View file @
8381c955
...
...
@@ -226,7 +226,7 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList &)
FeedIconManager
::
self
();
// FIXME: registering the icon manager dbus iface here,
// because otherwise we get a deadlock later
m_standardFeedList
=
QStandardPaths
::
writableLocation
(
QStandardPaths
::
GenericDataLocation
)
+
Q
Latin1String
(
"/akregator/data/feeds.opml"
);
m_standardFeedList
=
QStandardPaths
::
writableLocation
(
QStandardPaths
::
GenericDataLocation
)
+
Q
StringLiteral
(
"/akregator/data/feeds.opml"
);
QFileInfo
fileInfo
(
m_standardFeedList
);
QDir
().
mkpath
(
fileInfo
.
absolutePath
());
...
...
@@ -235,7 +235,7 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList &)
// There was already a dummy factory registered.
delete
dummyFactory
;
}
loadPlugins
(
Q
Latin1String
(
"storage"
));
// FIXME: also unload them!
loadPlugins
(
Q
StringLiteral
(
"storage"
));
// FIXME: also unload them!
m_storage
=
0
;
Backend
::
StorageFactory
*
storageFactory
=
Backend
::
StorageFactoryRegistry
::
self
()
->
getFactory
(
Settings
::
archiveBackend
());
...
...
@@ -299,7 +299,7 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList &)
Syndication
::
FileRetriever
::
setUserAgent
(
useragent
);
loadPlugins
(
Q
Latin1String
(
"extension"
));
// FIXME: also unload them!
loadPlugins
(
Q
StringLiteral
(
"extension"
));
// FIXME: also unload them!
if
(
!
readCrashProperties
())
{
autoReadProperties
();
...
...
@@ -505,7 +505,7 @@ void Part::slotSaveFeedList()
// the first time we overwrite the feed list, we create a backup
if
(
!
m_backedUpList
)
{
const
QString
backup
=
localFilePath
()
+
Q
Latin1String
(
"~"
);
const
QString
backup
=
localFilePath
()
+
Q
StringLiteral
(
"~"
);
if
(
QFile
::
copy
(
localFilePath
(),
backup
))
{
m_backedUpList
=
true
;
}
...
...
akregator/src/articlemodel.cpp
View file @
8381c955
...
...
@@ -66,7 +66,7 @@ static QString stripHtml(const QString &html)
{
QString
str
(
html
);
//TODO: preserve some formatting, such as line breaks
str
.
remove
(
QRegExp
(
Q
Latin1String
(
"<[^>]*>"
)));
// remove tags
str
.
remove
(
QRegExp
(
Q
StringLiteral
(
"<[^>]*>"
)));
// remove tags
str
=
Syndication
::
resolveEntities
(
str
);
return
str
.
simplified
();
}
...
...
blogilo/src/mainwindow.cpp
View file @
8381c955
...
...
@@ -100,8 +100,8 @@ MainWindow::MainWindow()
toolboxDock
->
setFeatures
(
QDockWidget
::
AllDockWidgetFeatures
);
toolboxDock
->
setWidget
(
toolbox
);
toolboxDock
->
setObjectName
(
Q
Latin1String
(
"dock_toolbox"
));
toolbox
->
setObjectName
(
Q
Latin1String
(
"toolbox"
));
toolboxDock
->
setObjectName
(
Q
StringLiteral
(
"dock_toolbox"
));
toolbox
->
setObjectName
(
Q
StringLiteral
(
"toolbox"
));
this
->
addDockWidget
(
Qt
::
RightDockWidgetArea
,
toolboxDock
);
...
...
@@ -117,7 +117,7 @@ MainWindow::MainWindow()
setupGUI
();
toolbox
->
setVisible
(
Settings
::
showToolboxOnStart
());
actionCollection
()
->
action
(
Q
Latin1String
(
"toggle_toolbox"
))
->
setChecked
(
Settings
::
showToolboxOnStart
());
actionCollection
()
->
action
(
Q
StringLiteral
(
"toggle_toolbox"
))
->
setChecked
(
Settings
::
showToolboxOnStart
());
setupSystemTray
();
...
...
@@ -212,44 +212,44 @@ void MainWindow::setupActions()
KStandardAction
::
preferences
(
this
,
SLOT
(
optionsPreferences
()),
actionCollection
());
// custom menu and menu item
QAction
*
actNewPost
=
new
QAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"document-new"
)),
i18n
(
"New Post"
),
this
);
actionCollection
()
->
addAction
(
Q
Latin1String
(
"new_post"
),
actNewPost
);
QAction
*
actNewPost
=
new
QAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"document-new"
)),
i18n
(
"New Post"
),
this
);
actionCollection
()
->
addAction
(
Q
StringLiteral
(
"new_post"
),
actNewPost
);
actionCollection
()
->
setDefaultShortcut
(
actNewPost
,
QKeySequence
(
Qt
::
CTRL
+
Qt
::
Key_N
));
connect
(
actNewPost
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
slotCreateNewPost
);
QAction
*
actAddBlog
=
new
QAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"list-add"
)),
i18n
(
"Add Blog..."
),
this
);
actionCollection
()
->
addAction
(
Q
Latin1String
(
"add_blog"
),
actAddBlog
);
QAction
*
actAddBlog
=
new
QAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"list-add"
)),
i18n
(
"Add Blog..."
),
this
);
actionCollection
()
->
addAction
(
Q
StringLiteral
(
"add_blog"
),
actAddBlog
);
connect
(
actAddBlog
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
addBlog
);
QAction
*
actPublish
=
new
QAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"arrow-up"
)),
i18n
(
"Submit..."
),
this
);
actionCollection
()
->
addAction
(
Q
Latin1String
(
"publish_post"
),
actPublish
);
QAction
*
actPublish
=
new
QAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"arrow-up"
)),
i18n
(
"Submit..."
),
this
);
actionCollection
()
->
addAction
(
Q
StringLiteral
(
"publish_post"
),
actPublish
);
connect
(
actPublish
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
slotPublishPost
);
QAction
*
actUpload
=
new
QAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"upload-media"
)),
i18n
(
"Upload Media..."
),
this
);
actionCollection
()
->
addAction
(
Q
Latin1String
(
"upload_media"
),
actUpload
);
QAction
*
actUpload
=
new
QAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"upload-media"
)),
i18n
(
"Upload Media..."
),
this
);
actionCollection
()
->
addAction
(
Q
StringLiteral
(
"upload_media"
),
actUpload
);
connect
(
actUpload
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
uploadMediaObject
);
QAction
*
actSaveLocally
=
new
QAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"document-save"
)),
i18n
(
"Save Locally"
),
this
);
actionCollection
()
->
addAction
(
Q
Latin1String
(
"save_locally"
),
actSaveLocally
);
QAction
*
actSaveLocally
=
new
QAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"document-save"
)),
i18n
(
"Save Locally"
),
this
);
actionCollection
()
->
addAction
(
Q
StringLiteral
(
"save_locally"
),
actSaveLocally
);
actionCollection
()
->
setDefaultShortcut
(
actSaveLocally
,
QKeySequence
(
Qt
::
CTRL
+
Qt
::
Key_S
));
connect
(
actSaveLocally
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
slotSavePostLocally
);
KToggleAction
*
actToggleToolboxVisible
=
new
KToggleAction
(
i18n
(
"Show Toolbox"
),
this
);
actionCollection
()
->
addAction
(
Q
Latin1String
(
"toggle_toolbox"
),
actToggleToolboxVisible
);
actionCollection
()
->
addAction
(
Q
StringLiteral
(
"toggle_toolbox"
),
actToggleToolboxVisible
);
actionCollection
()
->
setDefaultShortcut
(
actToggleToolboxVisible
,
QKeySequence
(
Qt
::
CTRL
+
Qt
::
Key_T
));
connect
(
actToggleToolboxVisible
,
&
KToggleAction
::
toggled
,
this
,
&
MainWindow
::
slotToggleToolboxVisible
);
connect
(
toolboxDock
,
&
QDockWidget
::
visibilityChanged
,
this
,
&
MainWindow
::
slotToolboxVisibilityChanged
);
blogs
=
new
KSelectAction
(
this
);
actionCollection
()
->
addAction
(
Q
Latin1String
(
"blogs_list"
),
blogs
);
actionCollection
()
->
addAction
(
Q
StringLiteral
(
"blogs_list"
),
blogs
);
QAction
*
actOpenBlog
=
new
QAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"applications-internet"
)),
i18n
(
"Open in browser"
),
this
);
actionCollection
()
->
addAction
(
Q
Latin1String
(
"open_blog_in_browser"
),
actOpenBlog
);
QAction
*
actOpenBlog
=
new
QAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"applications-internet"
)),
i18n
(
"Open in browser"
),
this
);
actionCollection
()
->
addAction
(
Q
StringLiteral
(
"open_blog_in_browser"
),
actOpenBlog
);
actOpenBlog
->
setToolTip
(
i18n
(
"Open current blog in browser"
));
connect
(
actOpenBlog
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
slotOpenCurrentBlogInBrowser
);
actionCollection
()
->
addAction
(
Q
Latin1String
(
"upload_file"
),
mStorageManager
->
menuUploadServices
(
this
));
actionCollection
()
->
addAction
(
Q
Latin1String
(
"download_file"
),
mStorageManager
->
menuDownloadServices
(
this
));
actionCollection
()
->
addAction
(
Q
StringLiteral
(
"upload_file"
),
mStorageManager
->
menuUploadServices
(
this
));
actionCollection
()
->
addAction
(
Q
StringLiteral
(
"download_file"
),
mStorageManager
->
menuDownloadServices
(
this
));
mStorageManager
->
setDefaultUploadFolder
(
Settings
::
self
()
->
downloadDirectory
());
}
...
...
@@ -340,10 +340,10 @@ void MainWindow::optionsPreferences()
// compare the names of the widgets in the .ui file
// to the names of the variables in the .kcfg file
//avoid having 2 dialogs shown
if
(
KConfigDialog
::
showDialog
(
Q
Latin1String
(
"settings"
)))
{
if
(
KConfigDialog
::
showDialog
(
Q
StringLiteral
(
"settings"
)))
{
return
;
}
ConfigureDialog
*
dialog
=
new
ConfigureDialog
(
mStorageManager
,
this
,
Q
Latin1String
(
"settings"
),
Settings
::
self
());
ConfigureDialog
*
dialog
=
new
ConfigureDialog
(
mStorageManager
,
this
,
Q
StringLiteral
(
"settings"
),
Settings
::
self
());
connect
(
dialog
,
&
ConfigureDialog
::
blogAdded
,
this
,
&
MainWindow
::
slotBlogAdded
);
connect
(
dialog
,
&
ConfigureDialog
::
blogEdited
,
this
,
&
MainWindow
::
slotBlogEdited
);
connect
(
dialog
,
&
ConfigureDialog
::
blogRemoved
,
this
,
&
MainWindow
::
slotBlogRemoved
);
...
...
@@ -424,9 +424,9 @@ void MainWindow::setupSystemTray()
if
(
Settings
::
enableSysTrayIcon
())
{
if
(
!
systemTray
)
{
systemTray
=
new
KStatusNotifierItem
(
this
);
systemTray
->
setIconByName
(
Q
Latin1String
(
"blogilo"
));
systemTray
->
setToolTip
(
Q
Latin1String
(
"blogilo"
),
i18n
(
"Blogilo"
),
i18n
(
"A KDE Blogging Client"
));
systemTray
->
contextMenu
()
->
addAction
(
actionCollection
()
->
action
(
Q
Latin1String
(
"new_post"
)));
systemTray
->
setIconByName
(
Q
StringLiteral
(
"blogilo"
));
systemTray
->
setToolTip
(
Q
StringLiteral
(
"blogilo"
),
i18n
(
"Blogilo"
),
i18n
(
"A KDE Blogging Client"
));
systemTray
->
contextMenu
()
->
addAction
(
actionCollection
()
->
action
(
Q
StringLiteral
(
"new_post"
)));
systemTray
->
setCategory
(
KStatusNotifierItem
::
ApplicationStatus
);
systemTray
->
setStatus
(
KStatusNotifierItem
::
Active
);
}
...
...
@@ -449,7 +449,7 @@ void MainWindow::slotToggleToolboxVisible(bool isVisible)
void
MainWindow
::
slotToolboxVisibilityChanged
(
bool
)
{
actionCollection
()
->
action
(
Q
Latin1String
(
"toggle_toolbox"
))
->
setChecked
(
toolboxDock
->
isVisibleTo
(
this
));
actionCollection
()
->
action
(
Q
StringLiteral
(
"toggle_toolbox"
))
->
setChecked
(
toolboxDock
->
isVisibleTo
(
this
));
}
void
MainWindow
::
slotActivePostChanged
(
int
index
)
...
...
@@ -616,7 +616,7 @@ void MainWindow::postManipulationDone(bool isError, const QString &customMessage
PostEntry
*
entry
=
qobject_cast
<
PostEntry
*>
(
sender
());
if
(
entry
)
{
if
(
KMessageBox
::
questionYesNo
(
this
,
i18n
(
"%1
\n
Do you want to keep the post open?"
,
customMessage
),
QString
(),
KStandardGuiItem
::
yes
(),
KStandardGuiItem
::
no
(),
Q
Latin1String
(
"KeepPostOpen"
))
==
KMessageBox
::
No
)
{
QString
(),
KStandardGuiItem
::
yes
(),
KStandardGuiItem
::
no
(),
Q
StringLiteral
(
"KeepPostOpen"
))
==
KMessageBox
::
No
)
{
slotRemovePostEntry
(
tabPosts
->
indexOf
(
entry
));
}
else
{
toolbox
->
setFieldsValue
(
entry
->
currentPost
());
...
...
blogilo/src/poststabwidget.cpp
View file @
8381c955
...
...
@@ -35,7 +35,7 @@ PostsTabWidget::PostsTabWidget(QWidget *parent)
setMovable
(
true
);
mNewTabButton
=
new
QToolButton
(
this
);
mNewTabButton
->
setIcon
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"tab-new"
)));
mNewTabButton
->
setIcon
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"tab-new"
)));
mNewTabButton
->
adjustSize
();
mNewTabButton
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Open a new tab"
));
#ifndef QT_NO_ACCESSIBILITY
...
...
@@ -45,7 +45,7 @@ PostsTabWidget::PostsTabWidget(QWidget *parent)
connect
(
mNewTabButton
,
&
QToolButton
::
clicked
,
this
,
&
PostsTabWidget
::
createNewPost
);
mCloseTabButton
=
new
QToolButton
(
this
);
mCloseTabButton
->
setIcon
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"tab-close"
)));
mCloseTabButton
->
setIcon
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"tab-close"
)));
mCloseTabButton
->
adjustSize
();
mCloseTabButton
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Close the current tab"
));
#ifndef QT_NO_ACCESSIBILITY
...
...
@@ -76,11 +76,11 @@ void PostsTabWidget::slotTabContextMenuRequest(const QPoint &pos)
QMenu
menu
(
this
);
QAction
*
closeTab
=
menu
.
addAction
(
i18nc
(
"@action:inmenu"
,
"Close Tab"
));
closeTab
->
setIcon
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"tab-close"
)));
closeTab
->
setIcon
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"tab-close"
)));
QAction
*
allOther
=
menu
.
addAction
(
i18nc
(
"@action:inmenu"
,
"Close All Other Tabs"
));
allOther
->
setEnabled
(
count
()
>
1
);
allOther
->
setIcon
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"tab-close-other"
)));
allOther
->
setIcon
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"tab-close-other"
)));
QAction
*
action
=
menu
.
exec
(
mapToGlobal
(
pos
));
...
...
storageservicemanager/main.cpp
View file @
8381c955
...
...
@@ -31,9 +31,9 @@
int
main
(
int
argc
,
char
**
argv
)
{
Kdelibs4ConfigMigrator
migrate
(
Q
Latin1String
(
"storageservice"
));
migrate
.
setConfigFiles
(
QStringList
()
<<
Q
Latin1String
(
"storageservicerc"
)
<<
QLatin1String
(
"storageservicemanager.notifyrc"
));
migrate
.
setUiFiles
(
QStringList
()
<<
Q
Latin1String
(
"storageserviceui.rc"
));
Kdelibs4ConfigMigrator
migrate
(
Q
StringLiteral
(
"storageservice"
));
migrate
.
setConfigFiles
(
QStringList
()
<<
Q
StringLiteral
(
"storageservicerc"
)
<<
QStringLiteral
(
"storageservicemanager.notifyrc"
));
migrate
.
setUiFiles
(
QStringList
()
<<
Q
StringLiteral
(
"storageserviceui.rc"
));
migrate
.
migrate
();
QApplication
app
(
argc
,
argv
);
...
...
@@ -44,9 +44,9 @@ int main(int argc, char **argv)
i18n
(
"Storage Service Manager"
),
KAboutLicense
::
GPL_V2
,
i18n
(
"Copyright © 2013-2015 storageservicemanager authors"
));
aboutData
.
addAuthor
(
i18n
(
"Laurent Montel"
),
i18n
(
"Maintainer"
),
Q
Latin1String
(
"montel@kde.org"
));
aboutData
.
addAuthor
(
i18n
(
"Laurent Montel"
),
i18n
(
"Maintainer"
),
Q
StringLiteral
(
"montel@kde.org"
));
QApplication
::
setWindowIcon
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"kmail"
)));
QApplication
::
setWindowIcon
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"kmail"
)));
KAboutData
::
setApplicationData
(
aboutData
);
QCommandLineParser
parser
;
...
...
storageservicemanager/storageservicelogdialog.cpp
View file @
8381c955
...
...
@@ -79,7 +79,7 @@ void StorageServiceLogDialog::slotClearLog()
void
StorageServiceLogDialog
::
slotSaveAs
()
{
const
QString
filter
=
Q
Latin1String
(
"*|"
)
+
i18n
(
"all files (*)"
);
const
QString
filter
=
Q
StringLiteral
(
"*|"
)
+
i18n
(
"all files (*)"
);
PimCommon
::
Util
::
saveTextAs
(
mLog
->
toPlainText
(),
filter
,
this
,
QUrl
(),
i18n
(
"Save Log"
));
}
...
...
@@ -92,7 +92,7 @@ void StorageServiceLogDialog::writeConfig()
{
KSharedConfig
::
Ptr
config
=
KSharedConfig
::
openConfig
();
KConfigGroup
group
=
config
->
group
(
Q
Latin1String
(
"StorageServiceLogDialog"
));
KConfigGroup
group
=
config
->
group
(
Q
StringLiteral
(
"StorageServiceLogDialog"
));
group
.
writeEntry
(
"Size"
,
size
());
}
...
...
storageservicemanager/storageservicetreewidget.cpp
View file @
8381c955
...
...
@@ -100,10 +100,10 @@ void StorageServiceTreeWidget::createMenuActions(QMenu *menu)
if
(
type
!=
StorageServiceTreeWidget
::
UnKnown
)
{
if
(
type
==
StorageServiceTreeWidget
::
File
)
{
if
(
mCapabilities
&
PimCommon
::
StorageServiceAbstract
::
MoveFileCapability
)
{
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"edit-cut"
)),
i18n
(
"Cut"
),
this
,
SLOT
(
slotCutFile
()));
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"edit-cut"
)),
i18n
(
"Cut"
),
this
,
SLOT
(
slotCutFile
()));
}
if
(
mCapabilities
&
PimCommon
::
StorageServiceAbstract
::
CopyFileCapability
)
{
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"edit-copy"
)),
i18n
(
"Copy"
),
this
,
SLOT
(
slotCopyFile
()));
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"edit-copy"
)),
i18n
(
"Copy"
),
this
,
SLOT
(
slotCopyFile
()));
}
QAction
*
act
=
new
QAction
(
menu
);
act
->
setSeparator
(
true
);
...
...
@@ -118,20 +118,20 @@ void StorageServiceTreeWidget::createMenuActions(QMenu *menu)
act
->
setSeparator
(
true
);
menu
->
addAction
(
act
);
if
(
mCapabilities
&
PimCommon
::
StorageServiceAbstract
::
DownloadFileCapability
)
{
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"download"
)),
i18n
(
"Download File"
),
this
,
SIGNAL
(
downloadFile
()));
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"download"
)),
i18n
(
"Download File"
),
this
,
SIGNAL
(
downloadFile
()));
}
act
=
new
QAction
(
menu
);
act
->
setSeparator
(
true
);
menu
->
addAction
(
act
);
if
(
mCapabilities
&
PimCommon
::
StorageServiceAbstract
::
DeleteFileCapability
)
{
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"edit-delete"
)),
i18n
(
"Delete File"
),
this
,
SLOT
(
slotDeleteFile
()));
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"edit-delete"
)),
i18n
(
"Delete File"
),
this
,
SLOT
(
slotDeleteFile
()));
}
}
else
if
(
type
==
StorageServiceTreeWidget
::
Folder
)
{
if
(
mCapabilities
&
PimCommon
::
StorageServiceAbstract
::
MoveFolderCapability
)
{
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"edit-cut"
)),
i18n
(
"Cut"
),
this
,
SLOT
(
slotCutFolder
()));
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"edit-cut"
)),
i18n
(
"Cut"
),
this
,
SLOT
(
slotCutFolder
()));
}
if
(
mCapabilities
&
PimCommon
::
StorageServiceAbstract
::
CopyFolderCapability
)
{
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"edit-copy"
)),
i18n
(
"Copy"
),
this
,
SLOT
(
slotCopyFolder
()));
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"edit-copy"
)),
i18n
(
"Copy"
),
this
,
SLOT
(
slotCopyFolder
()));
}
QAction
*
act
=
new
QAction
(
menu
);
act
->
setSeparator
(
true
);
...
...
@@ -143,7 +143,7 @@ void StorageServiceTreeWidget::createMenuActions(QMenu *menu)
act
->
setSeparator
(
true
);
menu
->
addAction
(
act
);
if
(
mCapabilities
&
PimCommon
::
StorageServiceAbstract
::
DeleteFolderCapability
)
{
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"edit-delete"
)),
i18n
(
"Delete Folder"
),
this
,
SLOT
(
slotDeleteFolder
()));
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"edit-delete"
)),
i18n
(
"Delete Folder"
),
this
,
SLOT
(
slotDeleteFolder
()));
}
}
}
...
...
@@ -157,7 +157,7 @@ void StorageServiceTreeWidget::createMenuActions(QMenu *menu)
act
->
setSeparator
(
true
);
menu
->
addAction
(
act
);
if
(
mCapabilities
&
PimCommon
::
StorageServiceAbstract
::
CreateFolderCapability
)
{
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"folder-new"
)),
i18n
(
"Create Folder..."
),
this
,
SLOT
(
slotCreateFolder
()));
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"folder-new"
)),
i18n
(
"Create Folder..."
),
this
,
SLOT
(
slotCreateFolder
()));
}
act
=
new
QAction
(
menu
);
...
...
@@ -167,21 +167,21 @@ void StorageServiceTreeWidget::createMenuActions(QMenu *menu)
if
(
mCopyItem
.
moveItem
)
{
if
(
mCopyItem
.
type
==
FileType
)
{
if
(
mCapabilities
&
PimCommon
::
StorageServiceAbstract
::
MoveFileCapability
)
{
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"edit-paste"
)),
i18n
(
"Paste"
),
this
,
SLOT
(
slotMoveFile
()));
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"edit-paste"
)),
i18n
(
"Paste"
),
this
,
SLOT
(
slotMoveFile
()));
}
}
else
if
(
mCopyItem
.
type
==
FolderType
)
{
if
(
mCapabilities
&
PimCommon
::
StorageServiceAbstract
::
MoveFolderCapability
)
{
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"edit-paste"
)),
i18n
(
"Paste"
),
this
,
SLOT
(
slotMoveFolder
()));
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"edit-paste"
)),
i18n
(
"Paste"
),
this
,
SLOT
(
slotMoveFolder
()));
}
}
}
else
{
if
(
mCopyItem
.
type
==
FileType
)
{
if
(
mCapabilities
&
PimCommon
::
StorageServiceAbstract
::
CopyFileCapability
)
{
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"edit-paste"
)),
i18n
(
"Paste"
),
this
,
SLOT
(
slotPasteFile
()));
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"edit-paste"
)),
i18n
(
"Paste"
),
this
,
SLOT
(
slotPasteFile
()));
}
}
else
if
(
mCopyItem
.
type
==
FolderType
)
{
if
(
mCapabilities
&
PimCommon
::
StorageServiceAbstract
::
CopyFolderCapability
)
{
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"edit-paste"
)),
i18n
(
"Paste"
),
this
,
SLOT
(
slotPasteFolder
()));
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"edit-paste"
)),
i18n
(
"Paste"
),
this
,
SLOT
(
slotPasteFolder
()));
}
}
}
...
...
@@ -192,7 +192,7 @@ void StorageServiceTreeWidget::createMenuActions(QMenu *menu)
createPropertiesAction
(
menu
);
}
}
else
{
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
Latin1String
(
"view-refresh"
)),
i18n
(
"Refresh"
),
this
,
SLOT
(
refreshList
()));
menu
->
addAction
(
QIcon
::
fromTheme
(
Q
StringLiteral
(
"view-refresh"
)),
i18n
(
"Refresh"
),
this
,
SLOT
(
refreshList
()));
}
}
...
...
@@ -269,7 +269,7 @@ bool StorageServiceTreeWidget::checkName(const QString &name)
return
false
;
}
}
if
(
name
==
Q
Latin1String
(
"."
)
||
name
==
QLatin1String
(
".."
))
{
if
(
name
==
Q
StringLiteral
(
"."
)
||
name
==
QStringLiteral
(
".."
))
{
KMessageBox
::
error
(
this
,
i18n
(
"You cannot name a folder or file . or .."
),
i18n
(
"Create Folder"
));
return
false
;
}
...
...
@@ -376,7 +376,7 @@ void StorageServiceTreeWidget::slotDownloadFile()
bool
StorageServiceTreeWidget
::
uploadFileToService
()
{
const
QString
filename
=
QFileDialog
::
getOpenFileName
(
this
,
QString
(),
QString
(),
Q
Latin1String
(
"*"
));
const
QString
filename
=
QFileDialog
::
getOpenFileName
(
this
,
QString
(),
QString
(),
Q
StringLiteral
(
"*"
));
if
(
!
filename
.
isEmpty
())
{
const
QRegExp
disallowedSymbols
=
mStorageService
->
disallowedSymbols
();
const
qlonglong
maximumLimit
=
mStorageService
->
maximumUploadFileSize
();
...
...
@@ -386,7 +386,7 @@ bool StorageServiceTreeWidget::uploadFileToService()
KMessageBox
::
error
(
this
,
i18n
(
"File size (%1) is larger than limit (%2)"
,
KFormat
().
formatByteSize
(
info
.
size
(),
1
),
KFormat
().
formatByteSize
(
maximumLimit
,
1
)));
return
false
;
}
if
(
filename
==
Q
Latin1String
(
"."
)
||
filename
==
QLatin1String
(
".."
))
{
if
(
filename
==
Q
StringLiteral
(
"."
)
||
filename
==
QStringLiteral
(
".."
))
{
KMessageBox
::
error
(
this
,
i18n
(
"You are trying to use unauthorized characters."
));
return
false
;
}
...
...
templateparser/templatesinsertcommand.cpp
View file @
8381c955
...
...
@@ -490,7 +490,7 @@ void TemplatesInsertCommand::slotMapped(int cmd)
switch
(
cmd
)
{
case
TemplatesInsertCommand
::
CBlank
:
emit
insertCommand
(
Q
Latin1String
(
"%BLANK"
));
emit
insertCommand
(
Q
StringLiteral
(
"%BLANK"
));
break
;
case
TemplatesInsertCommand
::
CQuote
:
emit
insertCommand
(
QStringLiteral
(
"%QUOTE"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment