Skip to content

Commit

Permalink
Qt5 connect
Browse files Browse the repository at this point in the history
  • Loading branch information
div72 committed Aug 14, 2020
1 parent 5759295 commit c2ed11e
Show file tree
Hide file tree
Showing 33 changed files with 245 additions and 245 deletions.
28 changes: 14 additions & 14 deletions src/qt/addressbookpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) :
switch(mode)
{
case ForSending:
connect(ui->tableView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(accept()));
connect(ui->tableView, &QTableView::doubleClicked, this, &QDialog::accept);
ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
ui->tableView->setFocus();
break;
Expand Down Expand Up @@ -85,18 +85,18 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) :
contextMenu->addAction(verifyMessageAction);

// Connect signals for context menu actions
connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(on_copyToClipboardButton_clicked()));
connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(onCopyLabelAction()));
connect(editAction, SIGNAL(triggered()), this, SLOT(onEditAction()));
connect(deleteAction, SIGNAL(triggered()), this, SLOT(on_deleteButton_clicked()));
connect(showQRCodeAction, SIGNAL(triggered()), this, SLOT(on_showQRCodeButton_clicked()));
connect(signMessageAction, SIGNAL(triggered()), this, SLOT(on_signMessageButton_clicked()));
connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(on_verifyMessageButton_clicked()));
connect(copyAddressAction, &QAction::triggered, this, &AddressBookPage::on_copyToClipboardButton_clicked);
connect(copyLabelAction, &QAction::triggered, this, &AddressBookPage::onCopyLabelAction);
connect(editAction, &QAction::triggered, this, &AddressBookPage::onEditAction);
connect(deleteAction, &QAction::triggered, this, &AddressBookPage::on_deleteButton_clicked);
connect(showQRCodeAction, &QAction::triggered, this, &AddressBookPage::on_showQRCodeButton_clicked);
connect(signMessageAction, &QAction::triggered, this, &AddressBookPage::on_signMessageButton_clicked);
connect(verifyMessageAction, &QAction::triggered, this, &AddressBookPage::on_verifyMessageButton_clicked);

connect(ui->tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint)));
connect(ui->tableView, &QWidget::customContextMenuRequested, this, &AddressBookPage::contextualMenu);

// Pass through accept action from button box
connect(ui->okayButtonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(ui->okayButtonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
}

AddressBookPage::~AddressBookPage()
Expand Down Expand Up @@ -136,12 +136,12 @@ void AddressBookPage::setModel(AddressTableModel *model)
ui->tableView->horizontalHeader()->setSectionResizeMode(AddressTableModel::Address, QHeaderView::ResizeToContents);
ui->tableView->horizontalHeader()->resizeSection(AddressTableModel::Address, 320);

connect(ui->tableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
this, SLOT(selectionChanged()));
connect(ui->tableView->selectionModel(), &QItemSelectionModel::selectionChanged,
this, &AddressBookPage::selectionChanged);

// Select row for newly created address
connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(selectNewAddress(QModelIndex,int,int)));
connect(model, &AddressTableModel::rowsInserted,
this, &AddressBookPage::selectNewAddress);

selectionChanged();
}
Expand Down
6 changes: 3 additions & 3 deletions src/qt/askpassphrasedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) :
}

textChanged();
connect(ui->oldPassphraseEdit, SIGNAL(textChanged(QString)), this, SLOT(textChanged()));
connect(ui->newPassphraseEdit, SIGNAL(textChanged(QString)), this, SLOT(textChanged()));
connect(ui->repeatNewPassphraseEdit, SIGNAL(textChanged(QString)), this, SLOT(textChanged()));
connect(ui->oldPassphraseEdit, &QLineEdit::textChanged, this, &AskPassphraseDialog::textChanged);
connect(ui->newPassphraseEdit, &QLineEdit::textChanged, this, &AskPassphraseDialog::textChanged);
connect(ui->repeatNewPassphraseEdit, &QLineEdit::textChanged, this, &AskPassphraseDialog::textChanged);
}

AskPassphraseDialog::~AskPassphraseDialog()
Expand Down
2 changes: 1 addition & 1 deletion src/qt/bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ int StartGridcoinQt(int argc, char *argv[])
QTimer *timer = new QTimer(guiref);
LogPrintf("Starting Gridcoin");

QObject::connect(timer, SIGNAL(timeout()), guiref, SLOT(timerfire()));
QObject::connect(timer, &QTimer::timeout, guiref, &timerfire);

if (!threads->createThread(ThreadAppInit2,threads,"AppInit2 Thread"))
{
Expand Down
4 changes: 2 additions & 2 deletions src/qt/bitcoinamountfield.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ BitcoinAmountField::BitcoinAmountField(QWidget *parent):
setFocusProxy(amount);

// If one if the widgets changes, the combined content changes as well
connect(amount, SIGNAL(valueChanged(QString)), this, SIGNAL(textChanged()));
connect(unit, SIGNAL(currentIndexChanged(int)), this, SLOT(unitChanged(int)));
connect(amount, static_cast<void (QDoubleSpinBox::*)(const QString&)>(&QDoubleSpinBox::textChanged), this, &BitcoinAmountField::textChanged);
connect(unit, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &BitcoinAmountField::unitChanged);

// Set default based on configuration
unitChanged(unit->currentIndex());
Expand Down
Loading

0 comments on commit c2ed11e

Please sign in to comment.