Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Graphics
KolourPaint
Commits
2851d290
Commit
2851d290
authored
Oct 02, 2014
by
Christoph Feck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KMenu -> QMenu
This fixes finding the tools menu, as well as undo/redo popups
parent
1e4f4248
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
10 deletions
+9
-10
commands/kpCommandHistoryBase.cpp
commands/kpCommandHistoryBase.cpp
+5
-5
mainWindow/kpMainWindow.cpp
mainWindow/kpMainWindow.cpp
+3
-4
mainWindow/kpMainWindow_Image.cpp
mainWindow/kpMainWindow_Image.cpp
+1
-1
No files found.
commands/kpCommandHistoryBase.cpp
View file @
2851d290
...
@@ -35,13 +35,13 @@
...
@@ -35,13 +35,13 @@
#include <qdatetime.h>
#include <qdatetime.h>
#include <qlinkedlist.h>
#include <qlinkedlist.h>
#include <qmenu.h>
#include <kapplication.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kdebug.h>
#include <kglobal.h>
#include <kglobal.h>
#include <klocale.h>
#include <klocale.h>
#include <kmenu.h>
#include <kstandardshortcut.h>
#include <kstandardshortcut.h>
#include <kstandardaction.h>
#include <kstandardaction.h>
#include <ktoolbarpopupaction.h>
#include <ktoolbarpopupaction.h>
...
@@ -617,7 +617,7 @@ void kpCommandHistoryBase::trimCommandLists ()
...
@@ -617,7 +617,7 @@ void kpCommandHistoryBase::trimCommandLists ()
}
}
static
void
populatePopupMenu
(
K
Menu
*
popupMenu
,
static
void
populatePopupMenu
(
Q
Menu
*
popupMenu
,
const
QString
&
undoOrRedo
,
const
QString
&
undoOrRedo
,
const
QLinkedList
<
kpCommand
*>
&
commandList
)
const
QLinkedList
<
kpCommand
*>
&
commandList
)
{
{
...
@@ -640,7 +640,7 @@ static void populatePopupMenu (KMenu *popupMenu,
...
@@ -640,7 +640,7 @@ static void populatePopupMenu (KMenu *popupMenu,
{
{
// TODO: maybe have a scrollview show all the items instead, like KOffice in KDE 3
// TODO: maybe have a scrollview show all the items instead, like KOffice in KDE 3
// LOCOMPAT: should be centered text.
// LOCOMPAT: should be centered text.
popupMenu
->
add
Title
(
i18np
(
"%1 more item"
,
"%1 more items"
,
popupMenu
->
add
Section
(
i18np
(
"%1 more item"
,
"%1 more items"
,
commandList
.
size
()
-
i
));
commandList
.
size
()
-
i
));
}
}
}
}
...
@@ -666,7 +666,7 @@ void kpCommandHistoryBase::updateActions ()
...
@@ -666,7 +666,7 @@ void kpCommandHistoryBase::updateActions ()
#if DEBUG_KP_COMMAND_HISTORY
#if DEBUG_KP_COMMAND_HISTORY
QTime
timer
;
timer
.
start
();
QTime
timer
;
timer
.
start
();
#endif
#endif
populatePopupMenu
(
qobject_cast
<
KMenu
*>
(
m_actionUndo
->
menu
()
)
,
populatePopupMenu
(
m_actionUndo
->
menu
(),
i18n
(
"Undo"
),
i18n
(
"Undo"
),
m_undoCommandList
);
m_undoCommandList
);
#if DEBUG_KP_COMMAND_HISTORY
#if DEBUG_KP_COMMAND_HISTORY
...
@@ -687,7 +687,7 @@ void kpCommandHistoryBase::updateActions ()
...
@@ -687,7 +687,7 @@ void kpCommandHistoryBase::updateActions ()
#if DEBUG_KP_COMMAND_HISTORY
#if DEBUG_KP_COMMAND_HISTORY
timer
.
restart
();
timer
.
restart
();
#endif
#endif
populatePopupMenu
(
qobject_cast
<
KMenu
*>
(
m_actionRedo
->
menu
()
)
,
populatePopupMenu
(
m_actionRedo
->
menu
(),
i18n
(
"Redo"
),
i18n
(
"Redo"
),
m_redoCommandList
);
m_redoCommandList
);
#if DEBUG_KP_COMMAND_HISTORY
#if DEBUG_KP_COMMAND_HISTORY
...
...
mainWindow/kpMainWindow.cpp
View file @
2851d290
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include <kpMainWindowPrivate.h>
#include <kpMainWindowPrivate.h>
#include <qevent.h>
#include <qevent.h>
#include <qmenu.h>
#include <qtimer.h>
#include <qtimer.h>
#include <kconfig.h>
#include <kconfig.h>
...
@@ -37,8 +38,6 @@
...
@@ -37,8 +38,6 @@
#include <kdebug.h>
#include <kdebug.h>
#include <kglobal.h>
#include <kglobal.h>
#include <klocale.h>
#include <klocale.h>
#include <KMenu>
#include <KMenuBar>
#include <krecentfilesaction.h>
#include <krecentfilesaction.h>
#include <kpAbstractImageSelection.h>
#include <kpAbstractImageSelection.h>
...
@@ -179,9 +178,9 @@ void kpMainWindow::finalizeGUI(KXMLGUIClient *client)
...
@@ -179,9 +178,9 @@ void kpMainWindow::finalizeGUI(KXMLGUIClient *client)
{
{
if
(
client
==
this
)
if
(
client
==
this
)
{
{
const
QList
<
K
Menu
*>
menuToHide
=
findChildren
<
K
Menu
*>
(
"toolToolBarHiddenMenu"
);
const
QList
<
Q
Menu
*>
menuToHide
=
findChildren
<
Q
Menu
*>
(
"toolToolBarHiddenMenu"
);
// should only contain one but...
// should only contain one but...
foreach
(
K
Menu
*
menu
,
menuToHide
)
foreach
(
Q
Menu
*
menu
,
menuToHide
)
{
{
menu
->
menuAction
()
->
setVisible
(
false
);
menu
->
menuAction
()
->
setVisible
(
false
);
}
}
...
...
mainWindow/kpMainWindow_Image.cpp
View file @
2851d290
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include <qaction.h>
#include <qaction.h>
#include <qcolor.h>
#include <qcolor.h>
#include <qmenubar.h>
#include <qsize.h>
#include <qsize.h>
#include <kactioncollection.h>
#include <kactioncollection.h>
...
@@ -40,7 +41,6 @@
...
@@ -40,7 +41,6 @@
#include <kdebug.h>
#include <kdebug.h>
#include <kglobal.h>
#include <kglobal.h>
#include <klocale.h>
#include <klocale.h>
#include <kmenubar.h>
#include <KToggleAction>
#include <KToggleAction>
#include <kpAbstractImageSelection.h>
#include <kpAbstractImageSelection.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment