Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
KolourPaint
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
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 @@
#include <qdatetime.h>
#include <qlinkedlist.h>
#include <qmenu.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
#include <kmenu.h>
#include <kstandardshortcut.h>
#include <kstandardaction.h>
#include <ktoolbarpopupaction.h>
...
...
@@ -617,7 +617,7 @@ void kpCommandHistoryBase::trimCommandLists ()
}
static
void
populatePopupMenu
(
K
Menu
*
popupMenu
,
static
void
populatePopupMenu
(
Q
Menu
*
popupMenu
,
const
QString
&
undoOrRedo
,
const
QLinkedList
<
kpCommand
*>
&
commandList
)
{
...
...
@@ -640,7 +640,7 @@ static void populatePopupMenu (KMenu *popupMenu,
{
// TODO: maybe have a scrollview show all the items instead, like KOffice in KDE 3
// 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
));
}
}
...
...
@@ -666,7 +666,7 @@ void kpCommandHistoryBase::updateActions ()
#if DEBUG_KP_COMMAND_HISTORY
QTime
timer
;
timer
.
start
();
#endif
populatePopupMenu
(
qobject_cast
<
KMenu
*>
(
m_actionUndo
->
menu
()
),
populatePopupMenu
(
m_actionUndo
->
menu
(
),
i18n
(
"Undo"
),
m_undoCommandList
);
#if DEBUG_KP_COMMAND_HISTORY
...
...
@@ -687,7 +687,7 @@ void kpCommandHistoryBase::updateActions ()
#if DEBUG_KP_COMMAND_HISTORY
timer
.
restart
();
#endif
populatePopupMenu
(
qobject_cast
<
KMenu
*>
(
m_actionRedo
->
menu
()
),
populatePopupMenu
(
m_actionRedo
->
menu
(
),
i18n
(
"Redo"
),
m_redoCommandList
);
#if DEBUG_KP_COMMAND_HISTORY
...
...
mainWindow/kpMainWindow.cpp
View file @
2851d290
...
...
@@ -30,6 +30,7 @@
#include <kpMainWindowPrivate.h>
#include <qevent.h>
#include <qmenu.h>
#include <qtimer.h>
#include <kconfig.h>
...
...
@@ -37,8 +38,6 @@
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
#include <KMenu>
#include <KMenuBar>
#include <krecentfilesaction.h>
#include <kpAbstractImageSelection.h>
...
...
@@ -179,9 +178,9 @@ void kpMainWindow::finalizeGUI(KXMLGUIClient *client)
{
if
(
client
==
this
)
{
const
QList
<
KMenu
*>
menuToHide
=
findChildren
<
K
Menu
*>
(
"toolToolBarHiddenMenu"
);
const
QList
<
QMenu
*>
menuToHide
=
findChildren
<
Q
Menu
*>
(
"toolToolBarHiddenMenu"
);
// should only contain one but...
foreach
(
K
Menu
*
menu
,
menuToHide
)
foreach
(
Q
Menu
*
menu
,
menuToHide
)
{
menu
->
menuAction
()
->
setVisible
(
false
);
}
...
...
mainWindow/kpMainWindow_Image.cpp
View file @
2851d290
...
...
@@ -31,6 +31,7 @@
#include <qaction.h>
#include <qcolor.h>
#include <qmenubar.h>
#include <qsize.h>
#include <kactioncollection.h>
...
...
@@ -40,7 +41,6 @@
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
#include <kmenubar.h>
#include <KToggleAction>
#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