Commit 54f53769 authored by Vijay Krishnavanshi's avatar Vijay Krishnavanshi Committed by Pali Rohár

Adapted ICQ Oscar Protocol to new Qt5 Slot and Signals

parent 0a1fa6ab
......@@ -58,20 +58,20 @@ QList<QAction*> *AIMContact::customContextMenuActions()
m_actionIgnore = new KToggleAction(i18n("&Ignore"), this );
//, "actionIgnore");
QObject::connect( m_actionIgnore, SIGNAL(triggered(bool)), this, SLOT(slotIgnore()) );
QObject::connect(m_actionIgnore, &KToggleAction::triggered, this, &AIMContact::slotIgnore);
m_actionVisibleTo = new KToggleAction(i18n("Always &Visible To"), this );
//, "actionVisibleTo");
QObject::connect( m_actionVisibleTo, SIGNAL(triggered(bool)), this, SLOT(slotVisibleTo()) );
QObject::connect(m_actionVisibleTo, &KToggleAction::triggered, this, &AIMContact::slotVisibleTo);
m_actionInvisibleTo = new KToggleAction(i18n("Always &Invisible To"), this );
//, "actionInvisibleTo");
QObject::connect( m_actionInvisibleTo, SIGNAL(triggered(bool)), this, SLOT(slotInvisibleTo()) );
QObject::connect(m_actionInvisibleTo, &KToggleAction::triggered, this, &AIMContact::slotInvisibleTo);
m_selectEncoding = new QAction( i18n( "Select Encoding..." ), this );
//, "changeEncoding" );
m_selectEncoding->setIcon( QIcon::fromTheme(QStringLiteral("character-set")) );
QObject::connect( m_selectEncoding, SIGNAL(triggered(bool)), this, SLOT(changeContactEncoding()) );
QObject::connect(m_selectEncoding, &QAction::triggered, this, &AIMContact::changeContactEncoding);
bool on = account()->isConnected();
m_actionIgnore->setEnabled(on);
......
......@@ -136,10 +136,10 @@ ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID)
// Create actions
mEditInfoAction = new QAction( QIcon::fromTheme("user-properties"), i18n( "Edit User Info..." ), this );
QObject::connect( mEditInfoAction, SIGNAL(triggered(bool)), this, SLOT(slotUserInfo()) );
QObject::connect(mEditInfoAction, &QAction::triggered, this, &ICQAccount::slotUserInfo);
mActionInvisible = new KToggleAction( i18n( "In&visible" ), this );
QObject::connect( mActionInvisible, SIGNAL(triggered(bool)), this, SLOT(slotToggleInvisible()) );
QObject::connect(mActionInvisible, &KToggleAction::triggered, this, &ICQAccount::slotToggleInvisible);
//setIgnoreUnknownContacts(pluginData(protocol(), "IgnoreUnknownContacts").toUInt() == 1);
......@@ -189,11 +189,11 @@ void ICQAccount::fillActionMenu( KActionMenu *actionMenu )
KActionMenu *xtrazStatusMenu = new KActionMenu( i18n( "Set Xtraz Status" ), actionMenu );
QAction* xtrazStatusSetAction = new QAction( i18n( "Set Status..." ), xtrazStatusMenu );
QObject::connect( xtrazStatusSetAction, SIGNAL(triggered(bool)), this, SLOT(setXtrazStatus()) );
QObject::connect(xtrazStatusSetAction, &QAction::triggered, this, &ICQAccount::setXtrazStatus);
xtrazStatusMenu->addAction( xtrazStatusSetAction );
QAction* xtrazStatusEditAction = new QAction( i18n( "Edit Statuses..." ), xtrazStatusMenu );
QObject::connect( xtrazStatusEditAction, SIGNAL(triggered(bool)), this, SLOT(editXtrazStatuses()) );
QObject::connect(xtrazStatusEditAction, &QAction::triggered, this, &ICQAccount::editXtrazStatuses);
xtrazStatusMenu->addAction( xtrazStatusEditAction );
ICQStatusManager* mgr = static_cast<ICQStatusManager *>(protocol()->statusManager());
......@@ -205,8 +205,7 @@ void ICQAccount::fillActionMenu( KActionMenu *actionMenu )
for ( int i = 0; i < xtrazStatusList.count(); i++ )
{
Xtraz::StatusAction* xtrazAction = new Xtraz::StatusAction( xtrazStatusList.at(i), xtrazStatusMenu );
QObject::connect( xtrazAction, SIGNAL(triggered(Xtraz::Status)),
this, SLOT(setPresenceXStatus(Xtraz::Status)) );
QObject::connect(xtrazAction, &Xtraz::StatusAction::triggeredStatus, this, &ICQAccount::setPresenceXStatus);
xtrazStatusMenu->addAction( xtrazAction );
}
......@@ -314,8 +313,8 @@ void ICQAccount::slotUserInfo()
return;
mInfoWidget = new ICQUserInfoWidget( this, engine()->userId(), Kopete::UI::Global::mainWidget(), true );
QObject::connect( mInfoWidget, SIGNAL(finished()), this, SLOT(closeUserInfoDialog()) );
QObject::connect( mInfoWidget, SIGNAL(okClicked()), this, SLOT(storeUserInfoDialog()) );
QObject::connect(mInfoWidget, &ICQUserInfoWidget::finished, this, &ICQAccount::closeUserInfoDialog);
// QObject::connect(mInfoWidget, &ICQUserInfoWidget::okClicked, this, &ICQAccount::storeUserInfoDialog);
mInfoWidget->show();
}
}
......@@ -487,7 +486,7 @@ void ICQAccount::slotGotAuthRequest( const QString& contact, const QString& reas
QString contactId = Oscar::normalize( contact );
Kopete::AddedInfoEvent* event = new Kopete::AddedInfoEvent( contactId, this );
QObject::connect( event, SIGNAL(actionActivated(uint)), this, SLOT(addedInfoEventActionActivated(uint)) );
QObject::connect(event, &Kopete::AddedInfoEvent::actionActivated, this, &ICQAccount::addedInfoEventActionActivated);
Kopete::AddedInfoEvent::ShowActionOptions actions = Kopete::AddedInfoEvent::AuthorizeAction;
actions |= Kopete::AddedInfoEvent::BlockAction;
......@@ -532,8 +531,8 @@ void ICQAccount::addedInfoEventActionActivated( uint actionId )
else
info = new ICQUserInfoWidget( this, event->contactId(), Kopete::UI::Global::mainWidget() );
QObject::connect( info, SIGNAL(finished()), info, SLOT(delayedDestruct()) );
QObject::connect( event, SIGNAL(eventClosed(Kopete::InfoEvent*)), info, SLOT(delayedDestruct()) );
// QObject::connect(info, &ICQUserInfoWidget::finished, info, &ICQUserInfoWidget::delayedDestruct);
// QObject::connect(event, &Kopete::AddedInfoEvent::eventClosed, info, &ICQUserInfoWidget::delayedDestruct);
info->setModal( false );
info->show();
}
......
......@@ -566,29 +566,29 @@ QList<QAction*> *ICQContact::customContextMenuActions()
actionRequestAuth = new QAction( i18n("&Request Authorization"), this );
//, "actionRequestAuth");
actionRequestAuth->setIcon( QIcon::fromTheme(QStringLiteral("mail-reply-sender")) );
QObject::connect( actionRequestAuth, SIGNAL(triggered(bool)), this, SLOT(slotRequestAuth()) );
QObject::connect(actionRequestAuth, &QAction::triggered, this, &ICQContact::slotRequestAuth);
actionSendAuth = new QAction( i18n("&Grant Authorization"), this );
//, "actionSendAuth");
actionSendAuth->setIcon( QIcon::fromTheme(QStringLiteral("mail-forward")) );
QObject::connect( actionSendAuth, SIGNAL(triggered(bool)), this, SLOT(slotSendAuth()) );
QObject::connect(actionSendAuth, &QAction::triggered, this, &ICQContact::slotSendAuth);
m_actionIgnore = new KToggleAction(i18n("&Ignore"), this );
//, "actionIgnore");
QObject::connect( m_actionIgnore, SIGNAL(triggered(bool)), this, SLOT(slotIgnore()) );
QObject::connect(m_actionIgnore, &KToggleAction::triggered, this, &ICQContact::slotIgnore);
m_actionVisibleTo = new KToggleAction(i18n("Always &Visible To"), this );
//, "actionVisibleTo");
QObject::connect( m_actionVisibleTo, SIGNAL(triggered(bool)), this, SLOT(slotVisibleTo()) );
QObject::connect(m_actionVisibleTo, &KToggleAction::triggered, this, &ICQContact::slotVisibleTo);
m_actionInvisibleTo = new KToggleAction(i18n("Always &Invisible To"), this );
//, "actionInvisibleTo");
QObject::connect( m_actionInvisibleTo, SIGNAL(triggered(bool)), this, SLOT(slotInvisibleTo()) );
QObject::connect(m_actionInvisibleTo, &KToggleAction::triggered, this, &ICQContact::slotInvisibleTo);
m_selectEncoding = new QAction( i18n( "Select Encoding..." ), this );
//, "changeEncoding" );
m_selectEncoding->setIcon( QIcon::fromTheme(QStringLiteral("character-set")) );
QObject::connect( m_selectEncoding, SIGNAL(triggered(bool)), this, SLOT(changeContactEncoding()) );
QObject::connect(m_selectEncoding, &QAction::triggered, this, &ICQContact::changeContactEncoding);
bool on = account()->isConnected();
if ( m_ssiItem.waitingAuth() )
......@@ -635,8 +635,8 @@ void ICQContact::slotUserInfo()
}
m_infoWidget = new ICQUserInfoWidget( this, Kopete::UI::Global::mainWidget() );
QObject::connect( m_infoWidget, SIGNAL(finished()), this, SLOT(closeUserInfoDialog()) );
QObject::connect( m_infoWidget, SIGNAL(okClicked()), this, SLOT(storeUserInfoDialog()) );
QObject::connect(m_infoWidget, &ICQUserInfoWidget::finished, this, &ICQContact::closeUserInfoDialog);
// QObject::connect(m_infoWidget, &ICQUserInfoWidget::okClicked, this, &ICQContact::storeUserInfoDialog);
m_infoWidget->show();
}
......@@ -683,7 +683,7 @@ void ICQContact::slotReadAwayMessage()
awayMessageDialog = new ICQReadAway(this, 0L, "awayMessageDialog");
if(!awayMessageDialog)
return;
QObject::connect(awayMessageDialog, SIGNAL(closing()), this, SLOT(slotCloseAwayMessageDialog()));
QObject::connect(awayMessageDialog, &ICQReadAway::closing, this, &ICQContact::slotCloseAwayMessageDialog);
awayMessageDialog->show();
}
else
......
......@@ -44,17 +44,11 @@ ICQReadAway::ICQReadAway(ICQContact *c, QWidget *parent, const char* name)
awayMessageBrowser->setNotifyClick(true);
awayMessageBrowser->setText(mContact->awayMessage());
QObject::connect(
awayMessageBrowser, SIGNAL(urlClick(QString)),
this, SLOT(slotUrlClicked(QString)));
QObject::connect(
awayMessageBrowser, SIGNAL(mailClick(QString,QString)),
this, SLOT(slotMailClicked(QString,QString)));
connect(this, SIGNAL(user1Clicked()),
this, SLOT(slotFetchAwayMessage()));
connect(this, SIGNAL(closeClicked()),
this, SLOT(slotCloseClicked()));
QObject::connect(awayMessageBrowser, &KTextBrowser::urlClick, this, &ICQReadAway::slotUrlClicked);
QObject::connect(awayMessageBrowser, &KTextBrowser::mailClick, this, &ICQReadAway::slotMailClicked);
connect(this, &ICQReadAway::user1Clicked, this, &ICQReadAway::slotFetchAwayMessage);
connect(this, &ICQReadAway::closeClicked, this, &ICQReadAway::slotCloseClicked);
connect(c, SIGNAL(awayMessageChanged()),
this, SLOT(slotAwayMessageChanged()));
......
......@@ -42,7 +42,7 @@ EditorWithIcon::EditorWithIcon( const QList<QIcon> &icons, QWidget *parent )
mLineEdit = new QLineEdit( this );
layout->addWidget( mLineEdit );
connect( mIconButton, SIGNAL(clicked()), this, SLOT(popupIcons()) );
connect(mIconButton, &QToolButton::clicked, this, &EditorWithIcon::popupIcons);
setIconIndex( 0 );
setTabOrder( mIconButton, mLineEdit );
setFocusProxy( mLineEdit );
......@@ -84,8 +84,8 @@ void EditorWithIcon::popupIcons()
iconCells->setColumnCount( 7 );
iconCells->setIcons( mIcons );
iconCells->setSelectedIndex( mIconIndex );
connect( iconCells, SIGNAL(selected(int)), this, SLOT(setIconIndex(int)) );
connect( iconCells, SIGNAL(selected(int)), popupFrame, SLOT(close()) );
connect(iconCells, &IconCells::selected, this, &EditorWithIcon::setIconIndex);
connect(iconCells, &IconCells::selected, popupFrame, &QFrame::close);
layout->addWidget( iconCells );
popupFrame->resize( QSize(150, 100).expandedTo(popupFrame->minimumSizeHint()) );
......
......@@ -57,8 +57,8 @@ IconCells::IconCells( QWidget *parent )
QFont timesFont( QStringLiteral("Times"), 10, QFont::Normal );
setFont( timesFont );
connect( this, SIGNAL(cellActivated(int,int)), this, SLOT(selected(int,int)) );
connect( this, SIGNAL(cellPressed(int,int)), this, SLOT(selected(int,int)) );
connect(this, &IconCells::cellActivated, this, &IconCells::slotSelected);
connect(this, &IconCells::cellPressed, this, &IconCells::slotSelected);
}
IconCells::~IconCells()
......@@ -128,7 +128,7 @@ void IconCells::setIcons( const QList<QIcon> &icons )
setMinimumSize( sizeHint() );
}
void IconCells::selected( int row, int column )
void IconCells::slotSelected( int row, int column )
{
int index = row * columnCount() + column;
......
......@@ -60,7 +60,7 @@ Q_SIGNALS:
void selected( int index );
protected Q_SLOTS:
void selected( int row, int column );
void slotSelected( int row, int column );
protected:
// the three methods below are used to ensure equal column widths and row heights
......
......@@ -37,10 +37,10 @@ ICQAddContactPage::ICQAddContactPage(ICQAccount *owner, QWidget *parent)
addUI = new Ui::icqAddUI();
addUI->setupUi(this);
connect( addUI->searchButton, SIGNAL(clicked()), this, SLOT(showSearchDialog()) );
connect( addUI->icqRadioButton, SIGNAL(toggled(bool)), addUI->icqEdit, SLOT(setEnabled(bool)) );
connect( addUI->icqRadioButton, SIGNAL(toggled(bool)), addUI->searchButton, SLOT(setEnabled(bool)) );
connect( addUI->aimRadioButton, SIGNAL(toggled(bool)), addUI->aimEdit, SLOT(setEnabled(bool)) );
connect(addUI->searchButton, &QPushButton::clicked, this, &ICQAddContactPage::showSearchDialog);
connect(addUI->icqRadioButton, &QRadioButton::toggled, addUI->icqEdit, &QLineEdit::setEnabled);
connect(addUI->icqRadioButton, &QRadioButton::toggled, addUI->searchButton, &QPushButton::setEnabled);
connect(addUI->aimRadioButton, &QRadioButton::toggled, addUI->aimEdit, &QLineEdit::setEnabled);
addUI->icqEdit->setFocus();
}
......@@ -117,7 +117,7 @@ void ICQAddContactPage::showSearchDialog()
{
m_searchDialog = new ICQSearchDialog( mAccount, this );
m_searchDialog->show();
connect( m_searchDialog, SIGNAL(finished()), this, SLOT(searchDialogDestroyed()) );
connect(m_searchDialog, &ICQSearchDialog::finished, this, &ICQAddContactPage::searchDialogDestroyed);
}
}
......
......@@ -131,20 +131,20 @@ ICQEditAccountWidget::ICQEditAccountWidget(ICQProtocol *protocol,
m_visibleEngine = new OscarPrivacyEngine( mAccount, OscarPrivacyEngine::Visible );
m_visibleEngine->setAllContactsView( mAccountSettings->visibleAllContacts );
m_visibleEngine->setContactsView( mAccountSettings->visibleContacts );
QObject::connect( mAccountSettings->visibleAdd, SIGNAL(clicked()), m_visibleEngine, SLOT(slotAdd()) );
QObject::connect( mAccountSettings->visibleRemove, SIGNAL(clicked()), m_visibleEngine, SLOT(slotRemove()) );
QObject::connect(mAccountSettings->visibleAdd, &QPushButton::clicked, m_visibleEngine, &OscarPrivacyEngine::slotAdd);
QObject::connect(mAccountSettings->visibleRemove, &QPushButton::clicked, m_visibleEngine, &OscarPrivacyEngine::slotRemove);
m_invisibleEngine = new OscarPrivacyEngine( mAccount, OscarPrivacyEngine::Invisible );
m_invisibleEngine->setAllContactsView( mAccountSettings->invisibleAllContacts );
m_invisibleEngine->setContactsView( mAccountSettings->invisibleContacts );
QObject::connect( mAccountSettings->invisibleAdd, SIGNAL(clicked()), m_invisibleEngine, SLOT(slotAdd()) );
QObject::connect( mAccountSettings->invisibleRemove, SIGNAL(clicked()), m_invisibleEngine, SLOT(slotRemove()) );
QObject::connect(mAccountSettings->invisibleAdd, &QPushButton::clicked, m_invisibleEngine, &OscarPrivacyEngine::slotAdd);
QObject::connect(mAccountSettings->invisibleRemove, &QPushButton::clicked, m_invisibleEngine, &OscarPrivacyEngine::slotRemove);
m_ignoreEngine = new OscarPrivacyEngine( mAccount, OscarPrivacyEngine::Ignore );
m_ignoreEngine->setAllContactsView( mAccountSettings->ignoreAllContacts );
m_ignoreEngine->setContactsView( mAccountSettings->ignoreContacts );
QObject::connect( mAccountSettings->ignoreAdd, SIGNAL(clicked()), m_ignoreEngine, SLOT(slotAdd()) );
QObject::connect( mAccountSettings->ignoreRemove, SIGNAL(clicked()), m_ignoreEngine, SLOT(slotRemove()) );
QObject::connect(mAccountSettings->ignoreAdd, &QPushButton::clicked, m_ignoreEngine, &OscarPrivacyEngine::slotAdd);
QObject::connect(mAccountSettings->ignoreRemove, &QPushButton::clicked, m_ignoreEngine, &OscarPrivacyEngine::slotRemove);
}
// Hide the registration UI when editing an existing account
mAccountSettings->registrationGroupBox->hide();
......@@ -203,8 +203,8 @@ ICQEditAccountWidget::ICQEditAccountWidget(ICQProtocol *protocol,
mAccountSettings->buttonChangePassword->setEnabled( false );
}
QObject::connect(mAccountSettings->buttonRegister, SIGNAL(clicked()), this, SLOT(slotOpenRegister()));
QObject::connect(mAccountSettings->buttonChangePassword, SIGNAL(clicked()), this, SLOT(slotChangePassword()));
QObject::connect(mAccountSettings->buttonRegister, &QPushButton::clicked, this, &ICQEditAccountWidget::slotOpenRegister);
QObject::connect(mAccountSettings->buttonChangePassword, &QPushButton::clicked, this, &ICQEditAccountWidget::slotChangePassword);
/* Set tab order to password custom widget correctly */
QWidget::setTabOrder( mAccountSettings->edtAccountId, mAccountSettings->mPasswordWidget->mRemembered );
......
......@@ -66,12 +66,12 @@ ICQSearchDialog::ICQSearchDialog( ICQAccount* account, QWidget* parent )
m_searchUI->searchResults->setModel( m_searchResultsModel );
m_searchUI->searchResults->setEditTriggers( QAbstractItemView::NoEditTriggers );
connect( m_searchUI->searchButton, SIGNAL(clicked()), this, SLOT(startSearch()) );
connect(m_searchUI->searchButton, &QPushButton::clicked, this, &ICQSearchDialog::startSearch);
connect( m_searchUI->searchResults->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
this, SLOT(selectionChanged(QItemSelection)) );
connect( m_searchUI->clearButton, SIGNAL(clicked()), this, SLOT(clear()) );
connect( m_searchUI->stopButton, SIGNAL(clicked()), this, SLOT(stopSearch()) );
connect( m_searchUI->userInfoButton, SIGNAL(clicked()), this, SLOT(userInfo()) );
connect(m_searchUI->clearButton, &QPushButton::clicked, this, &ICQSearchDialog::clear);
connect(m_searchUI->stopButton, &QPushButton::clicked, this, &ICQSearchDialog::stopSearch);
connect(m_searchUI->userInfoButton, &QPushButton::clicked, this, &ICQSearchDialog::userInfo);
ICQProtocol *p = ICQProtocol::protocol();
p->fillComboFromTable( m_searchUI->gender, p->genders() );
......@@ -201,7 +201,7 @@ void ICQSearchDialog::userInfo()
QString uin = model->data( index ).toString();
m_infoWidget = new ICQUserInfoWidget( m_account, uin, Kopete::UI::Global::mainWidget() );
QObject::connect( m_infoWidget, SIGNAL(finished()), this, SLOT(closeUserInfo()) );
QObject::connect(m_infoWidget, &ICQUserInfoWidget::finished, this, &ICQSearchDialog::closeUserInfo);
m_infoWidget->setModal(true);
m_infoWidget->show();
......
......@@ -156,32 +156,32 @@ void ICQUserInfoWidget::init()
m_otherInfoWidget->emailTableView->horizontalHeader()->setStretchLastSection( true );
m_otherInfoWidget->emailTableView->setSelectionMode( QAbstractItemView::SingleSelection );
connect( m_genInfoWidget->birthdayYearSpin, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateDay()) );
connect( m_genInfoWidget->birthdayMonthSpin, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateDay()) );
connect(m_genInfoWidget->birthdayYearSpin, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &ICQUserInfoWidget::slotUpdateDay);
connect(m_genInfoWidget->birthdayMonthSpin, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &ICQUserInfoWidget::slotUpdateDay);
connect( m_genInfoWidget->birthdayYearSpin, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateAge()) );
connect( m_genInfoWidget->birthdayMonthSpin, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateAge()) );
connect( m_genInfoWidget->birthdayDaySpin, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateAge()) );
connect(m_genInfoWidget->birthdayYearSpin, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &ICQUserInfoWidget::slotUpdateAge);
connect(m_genInfoWidget->birthdayMonthSpin, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &ICQUserInfoWidget::slotUpdateAge);
connect(m_genInfoWidget->birthdayDaySpin, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &ICQUserInfoWidget::slotUpdateAge);
connect( m_orgAffInfoWidget->org1CategoryCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotOrg1CategoryChanged(int)) );
connect( m_orgAffInfoWidget->org2CategoryCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotOrg2CategoryChanged(int)) );
connect( m_orgAffInfoWidget->org3CategoryCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotOrg3CategoryChanged(int)) );
connect(m_orgAffInfoWidget->org1CategoryCombo, static_cast<void (InfoComboBox::*)(int)>(&InfoComboBox::currentIndexChanged), this, &ICQUserInfoWidget::slotOrg1CategoryChanged);
connect(m_orgAffInfoWidget->org2CategoryCombo, static_cast<void (InfoComboBox::*)(int)>(&InfoComboBox::currentIndexChanged), this, &ICQUserInfoWidget::slotOrg2CategoryChanged);
connect(m_orgAffInfoWidget->org3CategoryCombo, static_cast<void (InfoComboBox::*)(int)>(&InfoComboBox::currentIndexChanged), this, &ICQUserInfoWidget::slotOrg3CategoryChanged);
connect( m_orgAffInfoWidget->aff1CategoryCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotAff1CategoryChanged(int)) );
connect( m_orgAffInfoWidget->aff2CategoryCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotAff2CategoryChanged(int)) );
connect( m_orgAffInfoWidget->aff3CategoryCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotAff3CategoryChanged(int)) );
connect(m_orgAffInfoWidget->aff1CategoryCombo, static_cast<void (InfoComboBox::*)(int)>(&InfoComboBox::currentIndexChanged), this, &ICQUserInfoWidget::slotAff1CategoryChanged);
connect(m_orgAffInfoWidget->aff2CategoryCombo, static_cast<void (InfoComboBox::*)(int)>(&InfoComboBox::currentIndexChanged), this, &ICQUserInfoWidget::slotAff2CategoryChanged);
connect(m_orgAffInfoWidget->aff3CategoryCombo, static_cast<void (InfoComboBox::*)(int)>(&InfoComboBox::currentIndexChanged), this, &ICQUserInfoWidget::slotAff3CategoryChanged);
connect( m_interestInfoWidget->topic1Combo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotInterestTopic1Changed(int)) );
connect( m_interestInfoWidget->topic2Combo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotInterestTopic2Changed(int)) );
connect( m_interestInfoWidget->topic3Combo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotInterestTopic3Changed(int)) );
connect( m_interestInfoWidget->topic4Combo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotInterestTopic4Changed(int)) );
connect(m_interestInfoWidget->topic1Combo, static_cast<void (InfoComboBox::*)(int)>(&InfoComboBox::currentIndexChanged), this, &ICQUserInfoWidget::slotInterestTopic1Changed);
connect(m_interestInfoWidget->topic2Combo, static_cast<void (InfoComboBox::*)(int)>(&InfoComboBox::currentIndexChanged), this, &ICQUserInfoWidget::slotInterestTopic2Changed);
connect(m_interestInfoWidget->topic3Combo, static_cast<void (InfoComboBox::*)(int)>(&InfoComboBox::currentIndexChanged), this, &ICQUserInfoWidget::slotInterestTopic3Changed);
connect(m_interestInfoWidget->topic4Combo, static_cast<void (InfoComboBox::*)(int)>(&InfoComboBox::currentIndexChanged), this, &ICQUserInfoWidget::slotInterestTopic4Changed);
if ( m_ownInfo )
{
connect( m_otherInfoWidget->addEmailButton, SIGNAL(clicked(bool)), this, SLOT(slotAddEmail()) );
connect( m_otherInfoWidget->removeEmailButton, SIGNAL(clicked(bool)), this, SLOT(slotRemoveEmail()) );
connect( m_otherInfoWidget->upEmailButton, SIGNAL(clicked(bool)), this, SLOT(slotUpEmail()) );
connect( m_otherInfoWidget->downEmailButton, SIGNAL(clicked(bool)), this, SLOT(slotDownEmail()) );
connect(m_otherInfoWidget->addEmailButton, &QPushButton::clicked, this, &ICQUserInfoWidget::slotAddEmail);
connect(m_otherInfoWidget->removeEmailButton, &QPushButton::clicked, this, &ICQUserInfoWidget::slotRemoveEmail);
connect(m_otherInfoWidget->upEmailButton, &QPushButton::clicked, this, &ICQUserInfoWidget::slotUpEmail);
connect(m_otherInfoWidget->downEmailButton, &QPushButton::clicked, this, &ICQUserInfoWidget::slotDownEmail);
connect( m_otherInfoWidget->emailTableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
this, SLOT(slotEmailSelectionChanged(QItemSelection)) );
}
......
......@@ -58,11 +58,11 @@ ICQStatusEditor::ICQStatusEditor( ICQStatusManager *statusManager, QWidget *pare
mUi->statusView->setModel( mXtrazStatusModel );
mUi->statusView->setCurrentIndex( mXtrazStatusModel->index( 0, 0 ) );
connect( mUi->buttonAdd, SIGNAL(clicked()), this, SLOT(addStatus()) );
connect( mUi->buttonDelete, SIGNAL(clicked()), this, SLOT(deleteStatus()) );
connect( mUi->buttonUp, SIGNAL(clicked()), this, SLOT(moveUp()) );
connect( mUi->buttonDown, SIGNAL(clicked()), this, SLOT(moveDown()) );
connect( this, SIGNAL(okClicked()), this, SLOT(save()) );
connect(mUi->buttonAdd, &QPushButton::clicked, this, &ICQStatusEditor::addStatus);
connect(mUi->buttonDelete, &QPushButton::clicked, this, &ICQStatusEditor::deleteStatus);
connect(mUi->buttonUp, &QPushButton::clicked, this, &ICQStatusEditor::moveUp);
connect(mUi->buttonDown, &QPushButton::clicked, this, &ICQStatusEditor::moveDown);
connect(this, &ICQStatusEditor::okClicked, this, &ICQStatusEditor::save);
connect( mUi->statusView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
this, SLOT(updateButtons()) );
......
......@@ -27,12 +27,13 @@ StatusAction::StatusAction( const Xtraz::Status &status, QObject *parent )
this->setIcon( QIcon::fromTheme( QStringLiteral( "icq_xstatus%1" ).arg( mStatus.status() ) ) );
this->setToolTip( mStatus.message() );
QObject::connect( this, SIGNAL(triggered(bool)), this, SLOT(triggered()) );
QObject::connect(this, &StatusAction::triggered, this, &StatusAction::slotTriggered);
}
void StatusAction::triggered()
void StatusAction::slotTriggered(bool value)
{
emit triggered( mStatus );
Q_UNUSED(value);
emit triggeredStatus(mStatus);
}
}
......
......@@ -31,10 +31,10 @@ public:
StatusAction( const Xtraz::Status &status, QObject *parent );
public Q_SLOTS:
void triggered();
void slotTriggered(bool);
Q_SIGNALS:
void triggered( const Xtraz::Status &status );
void triggeredStatus( const Xtraz::Status &status );
private:
Xtraz::Status mStatus;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment