Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
Konversation
Commits
2396506c
Commit
2396506c
authored
Oct 25, 2021
by
Marco Rebhan
Committed by
Albert Astals Cid
Nov 04, 2021
Browse files
Make setupUi public
parent
f8764a9c
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/mainwindow.cpp
View file @
2396506c
...
...
@@ -47,7 +47,7 @@
MainWindow
::
MainWindow
()
:
KXmlGuiWindow
(
nullptr
)
{
IrcContextMenus
::
self
()
->
setupUi
(
this
);
IrcContextMenus
::
setupUi
(
this
);
m_hasDirtySettings
=
false
;
m_closeApp
=
false
;
...
...
src/viewer/irccontextmenus.cpp
View file @
2396506c
...
...
@@ -55,6 +55,11 @@ IrcContextMenus::IrcContextMenus() : QObject()
}
void
IrcContextMenus
::
setupUi
(
QWidget
*
parent
)
{
self
()
->
doSetupUi
(
parent
);
}
void
IrcContextMenus
::
doSetupUi
(
QWidget
*
parent
)
{
m_parent
=
parent
;
createSharedBasicNickActions
();
...
...
src/viewer/irccontextmenus.h
View file @
2396506c
...
...
@@ -56,9 +56,7 @@ class IrcContextMenus : public QObject
~
IrcContextMenus
()
override
=
default
;
static
IrcContextMenus
*
self
();
void
setupUi
(
QWidget
*
parent
);
static
void
setupUi
(
QWidget
*
parent
);
static
int
textMenu
(
const
QPoint
&
pos
,
MenuOptions
options
,
Server
*
server
,
const
QString
&
selectedText
,
const
QString
&
link
,
const
QString
&
nick
=
QString
());
...
...
@@ -83,6 +81,9 @@ class IrcContextMenus : public QObject
private:
static
IrcContextMenus
*
self
();
void
doSetupUi
(
QWidget
*
parent
);
explicit
IrcContextMenus
();
friend
class
IrcContextMenusPrivate
;
...
...
src/viewer/viewcontainer.cpp
View file @
2396506c
...
...
@@ -30,7 +30,6 @@
#include
"irccolorchooser.h"
#include
"joinchanneldialog.h"
#include
"servergroupsettings.h"
#include
"irccontextmenus.h"
#include
"viewtree.h"
#include
"viewspringloader.h"
#include
"konversation_log.h"
...
...
@@ -140,25 +139,12 @@ ViewContainer::ViewContainer(MainWindow* window) : QAbstractItemModel(window)
m_dccPanel
->
hide
();
m_dccPanelOpen
=
false
;
connect
(
m_dccPanel
,
&
DCC
::
TransferPanel
::
updateTabNotification
,
this
,
&
ViewContainer
::
setViewNotification
);
// Pre-construct context menus for better responsiveness when then
// user opens them the first time. This is optional; the IrcContext-
// Menus API would work fine without doing this here.
// IrcContextMenus' setup code calls Application::instance(), and
// ViewContainer is constructed in the scope of the Application
// constructor, so to avoid a crash we need to queue.
QMetaObject
::
invokeMethod
(
this
,
"setupIrcContextMenus"
,
Qt
::
QueuedConnection
);
}
ViewContainer
::~
ViewContainer
()
{
}
void
ViewContainer
::
setupIrcContextMenus
()
{
IrcContextMenus
::
self
();
}
void
ViewContainer
::
showQueueTuner
(
bool
p
)
{
if
(
p
)
...
...
src/viewer/viewcontainer.h
View file @
2396506c
...
...
@@ -252,7 +252,6 @@ class ViewContainer : public QAbstractItemModel
void
frontServerChanging
(
Server
*
);
private
Q_SLOTS
:
void
setupIrcContextMenus
();
void
viewSwitched
(
int
newIndex
);
void
onViewTreeDestroyed
(
QObject
*
object
);
...
...
Write
Preview
Supports
Markdown
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