aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widgets')
-rw-r--r--src/ui/widgets/FindWidget.cpp10
-rw-r--r--src/ui/widgets/HelpPage.cpp4
-rw-r--r--src/ui/widgets/InfoBoardWidget.cpp10
-rw-r--r--src/ui/widgets/KeyList.cpp9
-rw-r--r--src/ui/widgets/SignersPicker.cpp2
-rw-r--r--src/ui/widgets/TextEdit.cpp24
-rw-r--r--src/ui/widgets/TextEdit.h18
-rw-r--r--src/ui/widgets/VerifyKeyDetailBox.cpp4
8 files changed, 43 insertions, 38 deletions
diff --git a/src/ui/widgets/FindWidget.cpp b/src/ui/widgets/FindWidget.cpp
index c1223475..58ceda7c 100644
--- a/src/ui/widgets/FindWidget.cpp
+++ b/src/ui/widgets/FindWidget.cpp
@@ -48,11 +48,11 @@ FindWidget::FindWidget(QWidget* parent, PlainTextEditorPage* edit)
notificationWidgetLayout->addWidget(closeButton);
this->setLayout(notificationWidgetLayout);
- connect(find_edit_, SIGNAL(textEdited(QString)), this, SLOT(slot_find()));
- connect(find_edit_, SIGNAL(returnPressed()), this, SLOT(slot_find_next()));
- connect(nextButton, SIGNAL(clicked()), this, SLOT(slot_find_next()));
- connect(previousButton, SIGNAL(clicked()), this, SLOT(slot_find_previous()));
- connect(closeButton, SIGNAL(clicked()), this, SLOT(slot_close()));
+ connect(find_edit_, &QLineEdit::textEdited, this, &FindWidget::slot_find);
+ connect(find_edit_, &QLineEdit::returnPressed, this, &FindWidget::slot_find_next);
+ connect(nextButton, &QPushButton::clicked, this, &FindWidget::slot_find_next);
+ connect(previousButton, &QPushButton::clicked, this, &FindWidget::slot_find_previous);
+ connect(closeButton, &QPushButton::clicked, this, &FindWidget::slot_close);
// The timer is necessary for setting the focus
QTimer::singleShot(0, find_edit_, SLOT(setFocus()));
diff --git a/src/ui/widgets/HelpPage.cpp b/src/ui/widgets/HelpPage.cpp
index 04bf609c..b116df30 100644
--- a/src/ui/widgets/HelpPage.cpp
+++ b/src/ui/widgets/HelpPage.cpp
@@ -40,8 +40,8 @@ HelpPage::HelpPage(const QString& path, QWidget* parent) : QWidget(parent) {
mainLayout->setContentsMargins(0, 0, 0, 0);
setLayout(mainLayout);
- connect(browser_, SIGNAL(anchorClicked(QUrl)), this,
- SLOT(slot_open_url(QUrl)));
+ connect(browser_, &QTextBrowser::anchorClicked, this,
+ &HelpPage::slot_open_url);
browser_->setOpenLinks(false);
browser_->setSource(localized_help(QUrl(path)));
browser_->setFocus();
diff --git a/src/ui/widgets/InfoBoardWidget.cpp b/src/ui/widgets/InfoBoardWidget.cpp
index 3d5db85c..bedcdf49 100644
--- a/src/ui/widgets/InfoBoardWidget.cpp
+++ b/src/ui/widgets/InfoBoardWidget.cpp
@@ -99,16 +99,18 @@ void InfoBoardWidget::SlotRefresh(const QString& text, InfoBoardStatus status) {
void InfoBoardWidget::AssociateTextEdit(QTextEdit* edit) {
if (m_text_page_ != nullptr)
- disconnect(m_text_page_, SIGNAL(textChanged()), this, SLOT(SlotReset()));
+ disconnect(m_text_page_, &QTextEdit::textChanged, this,
+ &InfoBoardWidget::SlotReset);
this->m_text_page_ = edit;
- connect(edit, SIGNAL(textChanged()), this, SLOT(SlotReset()));
+ connect(edit, &QTextEdit::textChanged, this, &InfoBoardWidget::SlotReset);
}
void InfoBoardWidget::AssociateTabWidget(QTabWidget* tab) {
m_text_page_ = nullptr;
m_tab_widget_ = tab;
- connect(tab, SIGNAL(tabBarClicked(int)), this, SLOT(SlotReset()));
- connect(tab, SIGNAL(tabCloseRequested(int)), this, SLOT(SlotReset()));
+ connect(tab, &QTabWidget::tabBarClicked, this, &InfoBoardWidget::SlotReset);
+ connect(tab, &QTabWidget::tabCloseRequested, this,
+ &InfoBoardWidget::SlotReset);
// reset
this->SlotReset();
}
diff --git a/src/ui/widgets/KeyList.cpp b/src/ui/widgets/KeyList.cpp
index 37378529..b9cc30d4 100644
--- a/src/ui/widgets/KeyList.cpp
+++ b/src/ui/widgets/KeyList.cpp
@@ -78,8 +78,9 @@ void KeyList::init() {
// register key database refresh signal
connect(this, &KeyList::SignalRefreshDatabase, SignalStation::GetInstance(),
&SignalStation::SignalKeyDatabaseRefresh);
- connect(SignalStation::GetInstance(), SIGNAL(KeyDatabaseRefresh()), this,
- SLOT(SlotRefresh()));
+ connect(SignalStation::GetInstance(),
+ &SignalStation::SignalKeyDatabaseRefresh, this,
+ &KeyList::SlotRefresh);
connect(ui_->refreshKeyListButton, &QPushButton::clicked, this,
&KeyList::SlotRefresh);
connect(ui_->uncheckButton, &QPushButton::clicked, this,
@@ -342,8 +343,8 @@ void KeyList::dropEvent(QDropEvent* event) {
// Buttons for ok and cancel
auto* buttonBox =
new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
- connect(buttonBox, SIGNAL(accepted()), dialog, SLOT(accept()));
- connect(buttonBox, SIGNAL(rejected()), dialog, SLOT(reject()));
+ connect(buttonBox, &QDialogButtonBox::accepted, dialog, &QDialog::accept);
+ connect(buttonBox, &QDialogButtonBox::rejected, dialog, &QDialog::reject);
auto* vbox = new QVBoxLayout();
vbox->addWidget(label);
diff --git a/src/ui/widgets/SignersPicker.cpp b/src/ui/widgets/SignersPicker.cpp
index b7551c9c..75f6b2ba 100644
--- a/src/ui/widgets/SignersPicker.cpp
+++ b/src/ui/widgets/SignersPicker.cpp
@@ -34,7 +34,7 @@ namespace GpgFrontend::UI {
SignersPicker::SignersPicker(QWidget* parent) : QDialog(parent) {
auto confirm_button = new QPushButton(_("Confirm"));
- connect(confirm_button, SIGNAL(clicked(bool)), this, SLOT(accept()));
+ connect(confirm_button, &QPushButton::clicked, this, &SignersPicker::accept);
/*Setup KeyList*/
key_list_ = new KeyList(false, this);
diff --git a/src/ui/widgets/TextEdit.cpp b/src/ui/widgets/TextEdit.cpp
index a0e16081..5556397e 100644
--- a/src/ui/widgets/TextEdit.cpp
+++ b/src/ui/widgets/TextEdit.cpp
@@ -45,8 +45,8 @@ TextEdit::TextEdit(QWidget* parent) : QWidget(parent) {
layout->setSpacing(0);
setLayout(layout);
- connect(tab_widget_, SIGNAL(tabCloseRequested(int)), this,
- SLOT(slot_remove_tab(int)));
+ connect(tab_widget_, &QTabWidget::tabCloseRequested, this,
+ &TextEdit::slot_remove_tab);
SlotNewTab();
setAcceptDrops(false);
}
@@ -129,8 +129,8 @@ void TextEdit::SlotOpen() {
QApplication::restoreOverrideCursor();
page->GetTextPage()->setFocus();
connect(page->GetTextPage()->document(),
- SIGNAL(modificationChanged(bool)), this,
- SLOT(SlotShowModified()));
+ &QTextDocument::modificationChanged, this,
+ &TextEdit::SlotShowModified);
// enableAction(true)
file.close();
} else {
@@ -508,7 +508,7 @@ QHash<int, QString> TextEdit::UnsavedDocuments() const {
return unsavedDocs;
}
-void TextEdit::slot_cut() const {
+void TextEdit::SlotCut() const {
if (tab_widget_->count() == 0 || CurTextPage() == nullptr) {
return;
}
@@ -516,7 +516,7 @@ void TextEdit::slot_cut() const {
CurTextPage()->GetTextPage()->cut();
}
-void TextEdit::slot_copy() const {
+void TextEdit::SlotCopy() const {
if (tab_widget_->count() == 0) {
return;
}
@@ -526,7 +526,7 @@ void TextEdit::slot_copy() const {
}
}
-void TextEdit::slot_paste() const {
+void TextEdit::SlotPaste() const {
if (tab_widget_->count() == 0 || CurTextPage() == nullptr) {
return;
}
@@ -534,7 +534,7 @@ void TextEdit::slot_paste() const {
CurTextPage()->GetTextPage()->paste();
}
-void TextEdit::slot_undo() const {
+void TextEdit::SlotUndo() const {
if (tab_widget_->count() == 0 || CurTextPage() == nullptr) {
return;
}
@@ -542,7 +542,7 @@ void TextEdit::slot_undo() const {
CurTextPage()->GetTextPage()->undo();
}
-void TextEdit::slot_redo() const {
+void TextEdit::SlotRedo() const {
if (tab_widget_->count() == 0 || CurTextPage() == nullptr) {
return;
}
@@ -550,7 +550,7 @@ void TextEdit::slot_redo() const {
CurTextPage()->GetTextPage()->redo();
}
-void TextEdit::slot_zoom_in() const {
+void TextEdit::SlotZoomIn() const {
if (tab_widget_->count() == 0) {
return;
}
@@ -560,7 +560,7 @@ void TextEdit::slot_zoom_in() const {
}
}
-void TextEdit::slot_zoom_out() const {
+void TextEdit::SlotZoomOut() const {
if (tab_widget_->count() == 0) {
return;
}
@@ -570,7 +570,7 @@ void TextEdit::slot_zoom_out() const {
}
}
-void TextEdit::slot_select_all() const {
+void TextEdit::SlotSelectAll() const {
if (tab_widget_->count() == 0 || CurTextPage() == nullptr) {
return;
}
diff --git a/src/ui/widgets/TextEdit.h b/src/ui/widgets/TextEdit.h
index e5b6b0ed..cb32bfb2 100644
--- a/src/ui/widgets/TextEdit.h
+++ b/src/ui/widgets/TextEdit.h
@@ -221,50 +221,52 @@ class TextEdit : public QWidget {
*/
void slot_remove_tab(int index);
+ public slots:
+
/**
* @details Cut selected text in current text page.
*/
- void slot_cut() const;
+ void SlotCut() const;
/**
* @details Copy selected text of current text page to clipboard.
*/
- void slot_copy() const;
+ void SlotCopy() const;
/**
* @details Paste text from clipboard to current text page.
*/
- void slot_paste() const;
+ void SlotPaste() const;
/**
* @details Undo last change in current textpage.
*
*/
- void slot_undo() const;
+ void SlotUndo() const;
/**
* @brief redo last change in current text page
*
*/
- void slot_redo() const;
+ void SlotRedo() const;
/**
* @brief
*
*/
- void slot_zoom_in() const;
+ void SlotZoomIn() const;
/**
* @brief
*
*/
- void slot_zoom_out() const;
+ void SlotZoomOut() const;
/**
* @brief select all in current text page
*
*/
- void slot_select_all() const;
+ void SlotSelectAll() const;
protected:
/**
diff --git a/src/ui/widgets/VerifyKeyDetailBox.cpp b/src/ui/widgets/VerifyKeyDetailBox.cpp
index 014072af..bbde591d 100644
--- a/src/ui/widgets/VerifyKeyDetailBox.cpp
+++ b/src/ui/widgets/VerifyKeyDetailBox.cpp
@@ -41,8 +41,8 @@ VerifyKeyDetailBox::VerifyKeyDetailBox(const GpgSignature& signature,
case GPG_ERR_NO_PUBKEY: {
this->setTitle("A Error Signature");
auto* importButton = new QPushButton(_("Import from keyserver"));
- connect(importButton, SIGNAL(clicked()), this,
- SLOT(slot_import_form_key_server()));
+ connect(importButton,&QPushButton::clicked, this,
+ &VerifyKeyDetailBox::slot_import_form_key_server);
this->setTitle(QString(_("Key not present with id 0x")) + fpr_.c_str());