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
26031447
Commit
26031447
authored
Sep 06, 2014
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port to new connect api
parent
81f4a81e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
30 deletions
+30
-30
blogilo/src/composer/htmleditor.cpp
blogilo/src/composer/htmleditor.cpp
+2
-2
blogilo/src/composer/stylegetter.cpp
blogilo/src/composer/stylegetter.cpp
+1
-1
blogilo/src/configurestorageservicewidget.cpp
blogilo/src/configurestorageservicewidget.cpp
+1
-1
blogilo/src/mainwindow.cpp
blogilo/src/mainwindow.cpp
+26
-26
No files found.
blogilo/src/composer/htmleditor.cpp
View file @
26031447
...
...
@@ -78,11 +78,11 @@ KTextEditor::View* HtmlEditor::createView( QWidget* parent )
if
(
interface
)
{
QAction
*
actWordWrap
=
new
QAction
(
i18n
(
"Dynamic Word Wrap"
),
view
);
actWordWrap
->
setCheckable
(
true
);
connect
(
actWordWrap
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
toggleWordWrap
())
);
connect
(
actWordWrap
,
&
QAction
::
triggered
,
this
,
&
HtmlEditor
::
toggleWordWrap
);
QAction
*
actLineNumber
=
new
QAction
(
i18n
(
"Show line numbers"
),
view
);
actLineNumber
->
setCheckable
(
true
);
connect
(
actLineNumber
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
toggleLineNumber
())
);
connect
(
actLineNumber
,
&
QAction
::
triggered
,
this
,
&
HtmlEditor
::
toggleLineNumber
);
QMenu
*
options
=
new
QMenu
(
i18n
(
"Options"
),
qobject_cast
<
QWidget
*
>
(
view
)
);
options
->
addAction
(
actWordWrap
);
...
...
blogilo/src/composer/stylegetter.cpp
View file @
26031447
...
...
@@ -83,7 +83,7 @@ StyleGetter::StyleGetter( const int blogid, QObject *parent )
b
=
new
Backend
(
blogid
);
connect
(
b
,
SIGNAL
(
sigPostPublished
(
int
,
BilboPost
*
)),
this
,
SLOT
(
slotTempPostPublished
(
int
,
BilboPost
*
))
);
connect
(
b
,
SIGNAL
(
sigError
(
QString
)),
this
,
SLOT
(
slotError
(
QString
))
);
connect
(
b
,
&
Backend
::
sigError
,
this
,
&
StyleGetter
::
slotError
);
Q_EMIT
sigGetStyleProgress
(
10
);
...
...
blogilo/src/configurestorageservicewidget.cpp
View file @
26031447
...
...
@@ -60,7 +60,7 @@ ConfigureStorageServiceWidget::ConfigureStorageServiceWidget(PimCommon::StorageS
{
QVBoxLayout
*
lay
=
new
QVBoxLayout
;
mStorageServiceConfigureWidget
=
new
StorageServiceConfigureWidget
;
connect
(
mStorageServiceConfigureWidget
,
SIGNAL
(
changed
()),
this
,
SIGNAL
(
changed
())
);
connect
(
mStorageServiceConfigureWidget
,
&
StorageServiceConfigureWidget
::
changed
,
this
,
&
ConfigureStorageServiceWidget
::
changed
);
lay
->
addWidget
(
mStorageServiceConfigureWidget
);
QHBoxLayout
*
hbox
=
new
QHBoxLayout
;
...
...
blogilo/src/mainwindow.cpp
View file @
26031447
...
...
@@ -89,10 +89,10 @@ MainWindow::MainWindow()
tabPosts
=
new
PostsTabWidget
(
this
);
setCentralWidget
(
tabPosts
);
connect
(
tabPosts
,
SIGNAL
(
createNewPost
()),
SLOT
(
slotCreateNewPost
())
);
connect
(
tabPosts
,
SIGNAL
(
closeTabClicked
()),
SLOT
(
slotCloseTabClicked
())
);
connect
(
tabPosts
,
SIGNAL
(
tabCloseRequested
(
int
)),
this
,
SLOT
(
slotRemovePostEntry
(
int
))
);
connect
(
tabPosts
,
SIGNAL
(
tabRemoveAllExclude
(
int
)),
this
,
SLOT
(
slotRemoveAllExclude
(
int
))
);
connect
(
tabPosts
,
&
PostsTabWidget
::
createNewPost
,
this
,
&
MainWindow
::
slotCreateNewPost
);
connect
(
tabPosts
,
&
PostsTabWidget
::
closeTabClicked
,
this
,
&
MainWindow
::
slotCloseTabClicked
);
connect
(
tabPosts
,
&
PostsTabWidget
::
tabCloseRequested
,
this
,
&
MainWindow
::
slotRemovePostEntry
);
connect
(
tabPosts
,
&
PostsTabWidget
::
tabRemoveAllExclude
,
this
,
&
MainWindow
::
slotRemoveAllExclude
);
toolbox
=
new
Toolbox
(
this
);
toolboxDock
=
new
QDockWidget
(
i18n
(
"Toolbox"
),
this
);
...
...
@@ -122,9 +122,9 @@ MainWindow::MainWindow()
setupSystemTray
();
connect
(
tabPosts
,
SIGNAL
(
currentChanged
(
int
)),
this
,
SLOT
(
slotActivePostChanged
(
int
))
);
connect
(
toolbox
,
SIGNAL
(
sigEntrySelected
(
BilboPost
&
,
int
)),
this
,
SLOT
(
slotNewPostOpened
(
BilboPost
&
,
int
))
);
connect
(
toolbox
,
SIGNAL
(
sigError
(
QString
)),
this
,
SLOT
(
slotError
(
QString
))
);
connect
(
toolbox
,
SIGNAL
(
sigBusy
(
bool
)),
this
,
SLOT
(
slotBusy
(
bool
))
);
connect
(
toolbox
,
&
Toolbox
::
sigEntrySelected
,
this
,
&
MainWindow
::
slotNewPostOpened
);
connect
(
toolbox
,
&
Toolbox
::
sigError
,
this
,
&
MainWindow
::
slotError
);
connect
(
toolbox
,
&
Toolbox
::
sigBusy
,
this
,
&
MainWindow
::
slotBusy
);
QList
<
BilboBlog
*>
blogList
=
DBMan
::
self
()
->
blogList
().
values
();
const
int
count
=
blogList
.
count
();
...
...
@@ -134,7 +134,7 @@ MainWindow::MainWindow()
act
->
setData
(
blogList
.
at
(
i
)
->
id
()
);
blogs
->
addAction
(
act
);
}
connect
(
blogs
,
SIGNAL
(
triggered
(
QAction
*
)),
this
,
SLOT
(
currentBlogChanged
(
QAction
*
))
);
connect
(
blogs
,
static_cast
<
void
(
KSelectAction
::*
)(
QAction
*
)
>
(
&
KSelectAction
::
triggered
),
this
,
&
MainWindow
::
currentBlogChanged
);
QTimer
::
singleShot
(
0
,
this
,
SLOT
(
loadTempPosts
())
);
}
...
...
@@ -156,10 +156,10 @@ void MainWindow::initStorageService()
configJob
->
registerConfigIf
(
settingsJob
);
mStorageManager
=
new
PimCommon
::
StorageServiceManager
(
this
);
connect
(
mStorageManager
,
SIGNAL
(
uploadFileDone
(
QString
,
QString
)),
this
,
SLOT
(
slotUploadFileDone
(
QString
,
QString
))
);
connect
(
mStorageManager
,
SIGNAL
(
shareLinkDone
(
QString
,
QString
)),
this
,
SLOT
(
slotUploadFileDone
(
QString
,
QString
))
);
connect
(
mStorageManager
,
SIGNAL
(
uploadFileFailed
(
QString
,
QString
)),
this
,
SLOT
(
slotUploadFileFailed
(
QString
,
QString
))
);
connect
(
mStorageManager
,
SIGNAL
(
actionFailed
(
QString
,
QString
)),
this
,
SLOT
(
slotActionFailed
(
QString
,
QString
))
);
connect
(
mStorageManager
,
&
PimCommon
::
StorageServiceManager
::
uploadFileDone
,
this
,
&
MainWindow
::
slotUploadFileDone
);
connect
(
mStorageManager
,
&
PimCommon
::
StorageServiceManager
::
shareLinkDone
,
this
,
&
MainWindow
::
slotUploadFileDone
);
connect
(
mStorageManager
,
&
PimCommon
::
StorageServiceManager
::
uploadFileFailed
,
this
,
&
MainWindow
::
slotUploadFileFailed
);
connect
(
mStorageManager
,
&
PimCommon
::
StorageServiceManager
::
actionFailed
,
this
,
&
MainWindow
::
slotActionFailed
);
}
void
MainWindow
::
slotUploadFileDone
(
const
QString
&
serviceName
,
const
QString
&
link
)
...
...
@@ -214,24 +214,24 @@ void MainWindow::setupActions()
QAction
*
actNewPost
=
new
QAction
(
QIcon
::
fromTheme
(
QLatin1String
(
"document-new"
)
),
i18n
(
"New Post"
),
this
);
actionCollection
()
->
addAction
(
QLatin1String
(
"new_post"
),
actNewPost
);
actionCollection
()
->
setDefaultShortcut
(
actNewPost
,
QKeySequence
(
Qt
::
CTRL
+
Qt
::
Key_N
));
connect
(
actNewPost
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
slotCreateNewPost
())
);
connect
(
actNewPost
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
slotCreateNewPost
);
QAction
*
actAddBlog
=
new
QAction
(
QIcon
::
fromTheme
(
QLatin1String
(
"list-add"
)
),
i18n
(
"Add Blog..."
),
this
);
actionCollection
()
->
addAction
(
QLatin1String
(
"add_blog"
),
actAddBlog
);
connect
(
actAddBlog
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
addBlog
())
);
connect
(
actAddBlog
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
addBlog
);
QAction
*
actPublish
=
new
QAction
(
QIcon
::
fromTheme
(
QLatin1String
(
"arrow-up"
)
),
i18n
(
"Submit..."
),
this
);
actionCollection
()
->
addAction
(
QLatin1String
(
"publish_post"
),
actPublish
);
connect
(
actPublish
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
slotPublishPost
())
);
connect
(
actPublish
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
slotPublishPost
);
QAction
*
actUpload
=
new
QAction
(
QIcon
::
fromTheme
(
QLatin1String
(
"upload-media"
)
),
i18n
(
"Upload Media..."
),
this
);
actionCollection
()
->
addAction
(
QLatin1String
(
"upload_media"
),
actUpload
);
connect
(
actUpload
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
uploadMediaObject
())
);
connect
(
actUpload
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
uploadMediaObject
);
QAction
*
actSaveLocally
=
new
QAction
(
QIcon
::
fromTheme
(
QLatin1String
(
"document-save"
)
),
i18n
(
"Save Locally"
),
this
);
actionCollection
()
->
addAction
(
QLatin1String
(
"save_locally"
),
actSaveLocally
);
actionCollection
()
->
setDefaultShortcut
(
actSaveLocally
,
QKeySequence
(
Qt
::
CTRL
+
Qt
::
Key_S
));
connect
(
actSaveLocally
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
slotSavePostLocally
())
);
connect
(
actSaveLocally
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
slotSavePostLocally
);
KToggleAction
*
actToggleToolboxVisible
=
new
KToggleAction
(
i18n
(
"Show Toolbox"
),
this
);
actionCollection
()
->
addAction
(
QLatin1String
(
"toggle_toolbox"
),
actToggleToolboxVisible
);
...
...
@@ -247,7 +247,7 @@ void MainWindow::setupActions()
QAction
*
actOpenBlog
=
new
QAction
(
QIcon
::
fromTheme
(
QLatin1String
(
"applications-internet"
)),
i18n
(
"Open in browser"
),
this
);
actionCollection
()
->
addAction
(
QLatin1String
(
"open_blog_in_browser"
),
actOpenBlog
);
actOpenBlog
->
setToolTip
(
i18n
(
"Open current blog in browser"
));
connect
(
actOpenBlog
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
slotOpenCurrentBlogInBrowser
())
);
connect
(
actOpenBlog
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
slotOpenCurrentBlogInBrowser
);
actionCollection
()
->
addAction
(
QLatin1String
(
"upload_file"
),
mStorageManager
->
menuUploadServices
(
this
)
);
actionCollection
()
->
addAction
(
QLatin1String
(
"download_file"
),
mStorageManager
->
menuDownloadServices
(
this
)
);
...
...
@@ -346,11 +346,11 @@ void MainWindow::optionsPreferences()
this
,
SLOT
(
slotBlogAdded
(
BilboBlog
))
);
connect
(
dialog
,
SIGNAL
(
blogEdited
(
BilboBlog
)),
this
,
SLOT
(
slotBlogEdited
(
BilboBlog
))
);
connect
(
dialog
,
SIGNAL
(
blogRemoved
(
int
)),
this
,
SLOT
(
slotBlogRemoved
(
int
))
);
connect
(
dialog
,
SIGNAL
(
settingsChanged
(
QString
)),
this
,
SIGNAL
(
settingsChanged
())
);
connect
(
dialog
,
SIGNAL
(
settingsChanged
(
QString
)),
this
,
SLOT
(
slotSettingsChanged
())
);
connect
(
dialog
,
SIGNAL
(
dialogDestroyed
(
QObject
*
)),
this
,
SLOT
(
slotDialogDestroyed
(
QObject
*
))
);
connect
(
dialog
,
SIGNAL
(
settingsChanged
()),
this
,
SLOT
(
slotSettingsChanged
())
);
connect
(
dialog
,
&
ConfigureDialog
::
blogRemoved
,
this
,
&
MainWindow
::
slotBlogRemoved
);
connect
(
dialog
,
&
ConfigureDialog
::
settingsChanged
,
this
,
&
MainWindow
::
settingsChanged
);
connect
(
dialog
,
&
ConfigureDialog
::
settingsChanged
,
this
,
&
MainWindow
::
slotSettingsChanged
);
connect
(
dialog
,
&
ConfigureDialog
::
dialogDestroyed
,
this
,
&
MainWindow
::
slotDialogDestroyed
);
connect
(
dialog
,
&
ConfigureDialog
::
settingsChanged
,
this
,
&
MainWindow
::
slotSettingsChanged
);
dialog
->
show
();
}
...
...
@@ -666,11 +666,11 @@ QWidget* MainWindow::createPostEntry(int blog_id, const BilboPost& post)
this
,
SLOT
(
slotPostTitleChanged
(
QString
))
);
connect
(
temp
,
SIGNAL
(
postPublishingDone
(
bool
,
QString
)),
this
,
SLOT
(
postManipulationDone
(
bool
,
QString
))
);
connect
(
this
,
SIGNAL
(
settingsChanged
()),
temp
,
SLOT
(
settingsChanged
())
);
connect
(
this
,
&
MainWindow
::
settingsChanged
,
temp
,
&
PostEntry
::
settingsChanged
);
connect
(
temp
,
SIGNAL
(
showStatusMessage
(
QString
,
bool
)),
this
,
SLOT
(
slotShowStatusMessage
(
QString
,
bool
)));
connect
(
temp
,
SIGNAL
(
sigBusy
(
bool
)),
this
,
SLOT
(
slotBusy
(
bool
))
);
connect
(
temp
,
&
PostEntry
::
sigBusy
,
this
,
&
MainWindow
::
slotBusy
);
tabPosts
->
addTab
(
temp
,
post
.
title
()
);
return
temp
;
...
...
@@ -684,7 +684,7 @@ void MainWindow::slotShowStatusMessage(const QString &message, bool isPermanent)
void
MainWindow
::
uploadMediaObject
()
{
UploadMediaDialog
*
uploadDlg
=
new
UploadMediaDialog
(
this
);
connect
(
uploadDlg
,
SIGNAL
(
sigBusy
(
bool
)),
SLOT
(
slotBusy
(
bool
))
);
connect
(
uploadDlg
,
&
UploadMediaDialog
::
sigBusy
,
this
,
&
MainWindow
::
slotBusy
);
if
(
mCurrentBlogId
==
-
1
)
uploadDlg
->
init
(
0
);
else
...
...
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