Commit 1498aa6a authored by R. Harish Navnit's avatar R. Harish Navnit Committed by Pali Rohár

Port away from KShortcut

parent fcc1e1a8
......@@ -374,7 +374,7 @@ void KopeteChatWindow::initActions(void)
//Default to 'Return' and 'Enter' for sending messages
//'Return' is the key in the main part of the keyboard
//'Enter' is on the Numpad
KShortcut chatSendShortcut( QKeySequence((int)Qt::Key_Return), QKeySequence((int)Qt::Key_Enter) );
QKeySequence chatSendShortcut( QKeySequence((int)Qt::Key_Return), QKeySequence((int)Qt::Key_Enter) );
chatSend->setShortcut( chatSendShortcut );
chatSend->setEnabled( false );
......
......@@ -563,7 +563,7 @@ void KopeteAccountConfig::configureActions()
// Remove account
m_actionAccountRemove = new KAction( i18n( "&Remove Account" ), this );
m_actionAccountRemove->setIcon( KIcon("edit-delete") );
m_actionAccountRemove->setShortcut(KShortcut(Qt::Key_Delete));
m_actionAccountRemove->setShortcut(QKeySequence(Qt::Key_Delete));
mButtonAccountRemove->setIcon( m_actionAccountRemove->icon() );
mButtonAccountRemove->setText( m_actionAccountRemove->text() );
connect( m_actionAccountRemove, SIGNAL(triggered(bool)), this, SLOT(removeAccount()) );
......
......@@ -167,10 +167,10 @@ void KopeteContactListView::initActions( KActionCollection *ac )
ac->addAction( "contactStartChat", d->actionStartChat );
d->actionMove = new KopeteGroupListAction( i18n( "&Move To" ), QLatin1String( "edit-cut" ),
KShortcut(), this, SLOT(moveToGroup()), ac );
QKeySequence(), this, SLOT(moveToGroup()), ac );
ac->addAction( "contactMove", d->actionMove );
d->actionCopy = new KopeteGroupListAction( i18n( "&Copy To" ), QLatin1String( "edit-copy" ),
KShortcut(), this, SLOT(copyToGroup()), ac );
QKeySequence(), this, SLOT(copyToGroup()), ac );
ac->addAction( "contactCopy", d->actionCopy );
d->actionMakeMetaContact = new KAction(KIcon("list-add-user"), i18n("Merge Meta Contacts"), ac);
......@@ -185,7 +185,7 @@ void KopeteContactListView::initActions( KActionCollection *ac )
connect( d->actionSendEmail, SIGNAL(triggered(bool)), this, SLOT(sendEmail()) );
d->actionRename = new KAction( KIcon("edit-rename"), i18nc( "verb, rename a contact", "Rename" ), ac );
d->actionRename->setShortcut( KShortcut(Qt::Key_F2) );
d->actionRename->setShortcut( QKeySequence(Qt::Key_F2) );
ac->addAction( "contactRename", d->actionRename );
connect( d->actionRename, SIGNAL(triggered(bool)), this, SLOT(rename()) );
......@@ -209,7 +209,7 @@ void KopeteContactListView::initActions( KActionCollection *ac )
d->actionProperties = new KAction( KIcon("user-properties"), i18n( "&Properties" ), ac );
ac->addAction( "contactProperties", d->actionProperties );
d->actionProperties->setShortcut( KShortcut(Qt::Key_Alt + Qt::Key_Return) );
d->actionProperties->setShortcut( QKeySequence(Qt::Key_Alt + Qt::Key_Return) );
connect( d->actionProperties, SIGNAL(triggered(bool)), this, SLOT(showItemProperties()) );
// Update enabled/disabled actions
......
......@@ -29,7 +29,7 @@
#include "kopetecontactlist.h"
#include "kopetegroup.h"
KopeteGroupListAction::KopeteGroupListAction( const QString &text, const QString &pix, const KShortcut &cut, const QObject *receiver,
KopeteGroupListAction::KopeteGroupListAction( const QString &text, const QString &pix, const QKeySequence &cut, const QObject *receiver,
const char *slot, QObject* parent )
: KSelectAction( KIcon(pix), text, parent )
{
......
......@@ -28,7 +28,7 @@ class KopeteGroupListAction : public KSelectAction
Q_OBJECT
public:
KopeteGroupListAction( const QString &, const QString &, const KShortcut &,
KopeteGroupListAction( const QString &, const QString &, const QKeySequence &,
const QObject *, const char *, QObject* );
~KopeteGroupListAction();
......
......@@ -458,7 +458,7 @@ void KopeteWindow::initActions()
d->actionShowAllOfflineEmpty = new KToggleAction ( KIcon ( "view-user-offline-kopete" ), i18n ( "Show &All" ), this );
actionCollection()->addAction ( "settings_show_all_offline_empty", d->actionShowAllOfflineEmpty );
d->actionShowAllOfflineEmpty->setShortcut ( KShortcut ( Qt::CTRL + Qt::Key_U ) );
d->actionShowAllOfflineEmpty->setShortcut ( QKeySequence ( Qt::CTRL + Qt::Key_U ) );
connect ( d->actionShowAllOfflineEmpty, SIGNAL (triggered(bool)), this, SLOT (slotToggleShowAllOfflineEmpty(bool)) );
d->actionShowOfflineUsers = new KToggleAction ( KIcon ( "view-user-offline-kopete" ), i18n ( "Show Offline &Users" ), this );
......@@ -467,7 +467,7 @@ void KopeteWindow::initActions()
d->actionShowEmptyGroups = new KToggleAction ( KIcon ( "folder-grey" ), i18n ( "Show Empty &Groups" ), this );
actionCollection()->addAction ( "settings_show_empty_groups", d->actionShowEmptyGroups );
d->actionShowEmptyGroups->setShortcut ( KShortcut ( Qt::CTRL + Qt::Key_G ) );
d->actionShowEmptyGroups->setShortcut ( QKeySequence ( Qt::CTRL + Qt::Key_G ) );
connect ( d->actionShowEmptyGroups, SIGNAL (triggered(bool)), this, SLOT (slotToggleShowEmptyGroups()) );
/* The following are highly misleading together with the checkbox, consider removing them - ahartmetz
......@@ -490,19 +490,19 @@ void KopeteWindow::initActions()
KAction *globalReadMessage = new KAction ( i18n ( "Read Message" ), this );
actionCollection()->addAction ( "ReadMessage", globalReadMessage );
connect ( globalReadMessage, SIGNAL (triggered(bool)), Kopete::ChatSessionManager::self(), SLOT (slotReadMessage()) );
globalReadMessage->setGlobalShortcut ( KShortcut ( Qt::CTRL + Qt::SHIFT + Qt::Key_I ) );
globalReadMessage->setGlobalShortcut ( QKeySequence ( Qt::CTRL + Qt::SHIFT + Qt::Key_I ) );
globalReadMessage->setWhatsThis ( i18n ( "Read the next pending message" ) );
KAction *globalShowContactList = new KAction ( i18n ( "Show/Hide Contact List" ), this );
actionCollection()->addAction ( "ShowContactList", globalShowContactList );
connect ( globalShowContactList, SIGNAL (triggered(bool)), this, SLOT (slotShowHide()) );
globalShowContactList->setGlobalShortcut ( KShortcut ( Qt::CTRL + Qt::ALT + Qt::Key_T ) );
globalShowContactList->setGlobalShortcut ( QKeySequence ( Qt::CTRL + Qt::ALT + Qt::Key_T ) );
globalShowContactList->setWhatsThis ( i18n ( "Show or hide the contact list" ) );
KAction *globalSetAway = new KAction ( i18n ( "Set Away/Back" ), this );
actionCollection()->addAction ( "Set_Away_Back", globalSetAway );
connect ( globalSetAway, SIGNAL (triggered(bool)), this, SLOT (slotToggleAway()) );
globalSetAway->setGlobalShortcut ( KShortcut ( Qt::CTRL + Qt::SHIFT + Qt::Key_W ) );
globalSetAway->setGlobalShortcut ( QKeySequence ( Qt::CTRL + Qt::SHIFT + Qt::Key_W ) );
}
void KopeteWindow::slotShowHide()
......
......@@ -35,7 +35,7 @@ public:
OnlineStatusAction::OnlineStatusAction( const OnlineStatus& status, const QString &text, const QIcon &pix, QObject *parent )
: KAction( KIcon(pix), text, parent) , d( new Private(status) )
{
setShortcut( KShortcut() );
setShortcut( QKeySequence() );
connect(this, SIGNAL(triggered(bool)), this, SLOT(slotActivated()));
......
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