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
Filelight
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
Utilities
Filelight
Commits
8d00ab65
Commit
8d00ab65
authored
Mar 29, 2017
by
Harald Sitter
🕵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make mainwindow derive from part and part the xmlwindow
first step to merging the two classes
parent
3cabf11e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
13 deletions
+8
-13
src/mainWindow.cpp
src/mainWindow.cpp
+2
-3
src/mainWindow.h
src/mainWindow.h
+2
-1
src/part.cpp
src/part.cpp
+1
-7
src/part.h
src/part.h
+3
-2
No files found.
src/mainWindow.cpp
View file @
8d00ab65
...
...
@@ -58,12 +58,11 @@ namespace Filelight {
MainWindow
::
MainWindow
()
// : KParts::MainWindow()
:
KXmlGuiWindow
(
)
,
m_part
(
new
Part
(
nullptr
,
this
,
QList
<
QVariant
>
())
)
:
Part
(
nullptr
,
nullptr
,
QList
<
QVariant
>
()
)
,
m_part
(
this
)
,
m_histories
(
0
)
{
// setXMLFile("filelightui.rc");
m_part
=
static_cast
<
Part
*>
(
new
Part
(
nullptr
,
this
,
QList
<
QVariant
>
()));
setStandardToolBarMenuEnabled
(
true
);
setupActions
();
...
...
src/mainWindow.h
View file @
8d00ab65
...
...
@@ -30,12 +30,13 @@ class KRecentFilesAction;
class
HistoryCollection
;
#include "part.h"
namespace
Filelight
{
class
Part
;
class
MainWindow
:
public
KXmlGuiWindow
// Maybe use qmainwindow
class
MainWindow
:
public
Part
// Maybe use qmainwindow
{
Q_OBJECT
...
...
src/part.cpp
View file @
8d00ab65
...
...
@@ -58,7 +58,7 @@ BrowserExtension::BrowserExtension(Part *parent)
Part
::
Part
(
QWidget
*
parentWidget
,
QObject
*
parent
,
const
QList
<
QVariant
>&
)
// : ReadOnlyPart(parent)
:
QObject
(
paren
t
)
:
KXmlGuiWindow
(
parentWidge
t
)
,
m_summary
(
0
)
,
m_ext
(
new
BrowserExtension
(
this
))
,
m_statusbar
(
new
StatusBarExtension
(
this
))
...
...
@@ -230,12 +230,6 @@ void Part::setUrl(const QUrl &url)
m_url
=
url
;
}
void
Part
::
stateChanged
(
const
QString
&
state
)
{
#warning port this calls xmlguiclient::stateChanged in parts
// Q_ASSERT(false);
}
void
Part
::
setWidget
(
QWidget
*
widget
)
{
m_widget
=
widget
;
...
...
src/part.h
View file @
8d00ab65
...
...
@@ -27,6 +27,8 @@
#include <KParts/Part>
#include <QUrl>
#include <KXmlGuiWindow>
#include <QLabel>
// COMPAT
...
...
@@ -76,7 +78,7 @@ signals:
class
Part
:
public
// KParts::ReadOnlyPart
QObject
KXmlGuiWindow
{
Q_OBJECT
...
...
@@ -132,7 +134,6 @@ public:
QWidget
*
widget
()
const
;
private:
void
setUrl
(
const
QUrl
&
url
);
void
stateChanged
(
const
QString
&
state
);
void
setWidget
(
QWidget
*
widget
);
QWidget
*
m_widget
=
nullptr
;
QUrl
m_url
;
...
...
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