[prev in list] [next in list] [prev in thread] [next in thread]
List: knode-devel
Subject: [Knode-devel] KDE/kdepim
From: Hamish Rodda <rodda () kde ! org>
Date: 2007-12-03 15:30:33
Message-ID: 1196695833.685500.30738.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 744427 by rodda:
KActionCollection::associateWidget -> addAssociatedWidget
M +8 -1 kalarm/birthdaydlg.cpp
M +8 -1 kmail/searchwindow.cpp
M +8 -1 knode/knarticlewindow.cpp
M +8 -1 knode/knmainwidget.cpp
M +8 -1 knotes/knote.cpp
M +8 -1 kontact/plugins/knotes/knotes_part_p.h
--- trunk/KDE/kdepim/kalarm/birthdaydlg.cpp #744426:744427
@@ -35,6 +35,7 @@
#include <kactioncollection.h>
#include <khbox.h>
#include <kdebug.h>
+#include <kdeversion.h>
#include "alarmcalendar.h"
#include "birthdaymodel.h"
@@ -211,7 +212,13 @@
KActionCollection* actions = new KActionCollection(this);
KStandardAction::selectAll(mListView, SLOT(selectAll()), actions);
KStandardAction::deselect(mListView, SLOT(clearSelection()), actions);
- actions->associateWidget(mListView);
+ actions->addAssociatedWidget(mListView);
+ foreach (QAction* action, actions->actions())
+#if QT_VERSION < KDE_MAKE_VERSION(4,4,0)
+ action->setShortcutContext(Qt::WidgetShortcut); // remove after Qt4.4 becomes mandatory
+#else
+ action->setShortcutContext(Qt::WidgetWithChildrenShortcut);
+#endif
enableButtonOk(false); // only enable OK button when something is selected
}
--- trunk/KDE/kdepim/kmail/searchwindow.cpp #744426:744427
@@ -45,6 +45,7 @@
#include <KStandardGuiItem>
#include <kstatusbar.h>
#include <KWindowSystem>
+#include <kdeversion.h>
#include "folderrequester.h"
#include "kmcommands.h"
@@ -342,7 +343,13 @@
connect(mCbxFolders, SIGNAL(folderChanged(KMFolder*)),
this, SLOT(slotFolderActivated()));
- ac->associateWidget( this );
+ ac->addAssociatedWidget( this );
+ foreach (QAction* action, ac->actions())
+#if QT_VERSION < KDE_MAKE_VERSION(4,4,0)
+ action->setShortcutContext(Qt::WidgetShortcut); // remove after Qt4.4 becomes mandatory
+#else
+ action->setShortcutContext(Qt::WidgetWithChildrenShortcut);
+#endif
}
//-----------------------------------------------------------------------------
--- trunk/KDE/kdepim/knode/knarticlewindow.cpp #744426:744427
@@ -19,6 +19,7 @@
#include <kconfig.h>
#include <kaction.h>
#include <kactioncollection.h>
+#include <kdeversion.h>
#include "knarticle.h"
#include "articlewidget.h"
@@ -118,7 +119,13 @@
applyMainWindowSettings(KConfigGroup( knGlobals.config(), "articleWindow_options") );
// this will enable keyboard-only actions like that don't appear in any menu
- actionCollection()->associateWidget( this );
+ actionCollection()->addAssociatedWidget( this );
+ foreach (QAction* action, actionCollection()->actions())
+#if QT_VERSION < KDE_MAKE_VERSION(4,4,0)
+ action->setShortcutContext(Qt::WidgetShortcut); // remove after Qt4.4 becomes mandatory
+#else
+ action->setShortcutContext(Qt::WidgetWithChildrenShortcut);
+#endif
}
--- trunk/KDE/kdepim/knode/knmainwidget.cpp #744426:744427
@@ -31,6 +31,7 @@
#include <kedittoolbar.h>
#include <kstandardaction.h>
#include <kdebug.h>
+#include <kdeversion.h>
#include <kmenubar.h>
#include <kiconloader.h>
#include <kstatusbar.h>
@@ -237,7 +238,13 @@
slotSettings();
}
- actionCollection()->associateWidget( this );
+ actionCollection()->addAssociatedWidget( this );
+ foreach (QAction* action, actionCollection()->actions())
+#if QT_VERSION < KDE_MAKE_VERSION(4,4,0)
+ action->setShortcutContext(Qt::WidgetShortcut); // remove after Qt4.4 becomes mandatory
+#else
+ action->setShortcutContext(Qt::WidgetWithChildrenShortcut);
+#endif
}
KNMainWidget::~KNMainWidget()
--- trunk/KDE/kdepim/knotes/knote.cpp #744426:744427
@@ -66,6 +66,7 @@
#include <kxmlguibuilder.h>
#include <kxmlguifactory.h>
#include <netwm.h>
+#include <kdeversion.h>
#ifdef Q_WS_X11
#include <fixx11h.h>
@@ -686,7 +687,13 @@
connect( action, SIGNAL( triggered( bool ) ), SIGNAL( sigShowNextNote() ) );
action->setShortcut( QKeySequence( Qt::SHIFT + Qt::Key_Backtab ) );
- actionCollection()->associateWidget( this );
+ actionCollection()->addAssociatedWidget( this );
+ foreach (QAction* action, actionCollection()->actions())
+#if QT_VERSION < KDE_MAKE_VERSION(4,4,0)
+ action->setShortcutContext(Qt::WidgetShortcut); // remove after Qt4.4 becomes mandatory
+#else
+ action->setShortcutContext(Qt::WidgetWithChildrenShortcut);
+#endif
}
void KNote::createNoteHeader()
--- trunk/KDE/kdepim/kontact/plugins/knotes/knotes_part_p.h #744426:744427
@@ -52,6 +52,7 @@
#include <kxmlguiclient.h>
#include <kxmlguifactory.h>
#include <kxmlguibuilder.h>
+#include <kdeversion.h>
#include <kcal/journal.h>
#include <kcal/calendarlocal.h>
@@ -169,7 +170,13 @@
layout->addWidget( mTool );
layout->addWidget( mNoteEdit );
- actionCollection()->associateWidget( this );
+ actionCollection()->addAssociatedWidget( this );
+ foreach (QAction* action, actionCollection()->actions())
+#if QT_VERSION < KDE_MAKE_VERSION(4,4,0)
+ action->setShortcutContext(Qt::WidgetShortcut); // remove after Qt4.4 becomes mandatory
+#else
+ action->setShortcutContext(Qt::WidgetWithChildrenShortcut);
+#endif
}
QString text() const
_______________________________________________
Knode-devel mailing list
Knode-devel@kde.org
https://mail.kde.org/mailman/listinfo/knode-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic