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
Utilities
KDiskFree
Commits
ef3063a6
Commit
ef3063a6
authored
Jan 18, 2021
by
Laurent Montel
😁
Browse files
Modernize code
parent
9c114b97
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/kcmdf.cpp
View file @
ef3063a6
...
...
@@ -35,7 +35,7 @@ KDiskFreeWidget::KDiskFreeWidget( QWidget *parent )
setButtons
(
Help
);
QVBoxLayout
*
topLayout
=
new
QVBoxLayout
(
this
);
topLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
topLayout
->
setContentsMargins
(
{}
);
mKdf
=
new
KDFWidget
(
this
,
false
);
topLayout
->
addWidget
(
mKdf
);
...
...
src/kdf.cpp
View file @
ef3063a6
...
...
@@ -47,8 +47,8 @@ KDFTopLevel::KDFTopLevel(QWidget *)
actionCollection
()
->
setDefaultShortcuts
(
action
,
KStandardShortcut
::
reload
());
connect
(
action
,
&
QAction
::
triggered
,
kdf
,
&
KDFWidget
::
updateDF
);
KStandardAction
::
quit
(
this
,
SLOT
(
close
())
,
actionCollection
());
KStandardAction
::
preferences
(
kdf
,
SLOT
(
settingsBtnClicked
())
,
actionCollection
());
KStandardAction
::
quit
(
this
,
&
KDFTopLevel
::
close
,
actionCollection
());
KStandardAction
::
preferences
(
kdf
,
&
KDFWidget
::
settingsBtnClicked
,
actionCollection
());
KStandardAction
::
keyBindings
(
guiFactory
(),
SLOT
(
configureShortcuts
()),
actionCollection
());
setCentralWidget
(
kdf
);
...
...
src/kdfwidget.cpp
View file @
ef3063a6
...
...
@@ -56,7 +56,7 @@ static bool GUI;
#endif
KDFWidget
::
KDFWidget
(
QWidget
*
parent
,
bool
init
)
:
QWidget
(
parent
)
,
mOptionDialog
(
nullptr
),
mPopup
(
nullptr
),
mTimer
(
nullptr
)
:
QWidget
(
parent
)
{
connect
(
&
mDiskList
,
&
DiskList
::
readDFDone
,
this
,
&
KDFWidget
::
updateDFDone
);
...
...
src/kdfwidget.h
View file @
ef3063a6
...
...
@@ -100,19 +100,19 @@ class KDFPRIVATE_EXPORT KDFWidget : public QWidget
QIcon
generateIcon
(
const
QString
&
iconName
,
bool
mode
,
bool
mounted
);
bool
readingDF
;
COptionDialog
*
mOptionDialog
;
QMenu
*
mPopup
;
QTimer
*
mTimer
;
COptionDialog
*
mOptionDialog
=
nullptr
;
QMenu
*
mPopup
=
nullptr
;
QTimer
*
mTimer
=
nullptr
;
DiskList
mDiskList
;
bool
mIsTopLevel
;
CStdOption
mStd
;
QTreeView
*
m_listWidget
;
KDFItemDelegate
*
m_itemDelegate
;
QTreeView
*
m_listWidget
=
nullptr
;
KDFItemDelegate
*
m_itemDelegate
=
nullptr
;
QList
<
Column
>
m_columnList
;
QStandardItemModel
*
m_listModel
;
KDFSortFilterProxyModel
*
m_sortModel
;
QStandardItemModel
*
m_listModel
=
nullptr
;
KDFSortFilterProxyModel
*
m_sortModel
=
nullptr
;
};
#endif
...
...
src/optiondialog.cpp
View file @
ef3063a6
...
...
@@ -76,7 +76,7 @@ void COptionDialog::slotChanged()
dataChanged
=
true
;
}
void
COptionDialog
::
slotHelp
(
void
)
void
COptionDialog
::
slotHelp
()
{
KHelpClient
::
invokeHelp
(
QLatin1String
(
""
),
QStringLiteral
(
"kdf"
));
}
...
...
src/optiondialog.h
View file @
ef3063a6
...
...
@@ -45,8 +45,8 @@ class KDFPRIVATE_EXPORT COptionDialog : public KPageDialog
void
valueChanged
();
private:
KDFConfigWidget
*
mConf
;
MntConfigWidget
*
mMnt
;
KDFConfigWidget
*
mConf
=
nullptr
;
MntConfigWidget
*
mMnt
=
nullptr
;
bool
dataChanged
;
};
...
...
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