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
Plasma
Plasma Desktop
Commits
c594807f
Commit
c594807f
authored
May 13, 2021
by
Laurent Montel
😁
Browse files
Use Q_EMIT here too
parent
b1b0df34
Changes
59
Hide whitespace changes
Inline
Side-by-side
applets/kimpanel/plugin/kimpanel.cpp
View file @
c594807f
...
...
@@ -46,7 +46,7 @@ void Kimpanel::updateAux(const QString &text, const QList<TextAttribute> &attrLi
Q_UNUSED
(
attrList
);
if
(
m_auxText
!=
text
)
{
m_auxText
=
text
;
emit
auxTextChanged
();
Q_EMIT
auxTextChanged
();
}
}
...
...
@@ -55,7 +55,7 @@ void Kimpanel::updatePreeditText(const QString &text, const QList<TextAttribute>
Q_UNUSED
(
attrList
);
if
(
m_preeditText
!=
text
)
{
m_preeditText
=
text
;
emit
preeditTextChanged
();
Q_EMIT
preeditTextChanged
();
}
}
...
...
@@ -63,7 +63,7 @@ void Kimpanel::updatePreeditCaret(int pos)
{
if
(
m_caretPos
!=
pos
)
{
m_caretPos
=
pos
;
emit
preeditTextChanged
();
Q_EMIT
preeditTextChanged
();
}
}
...
...
@@ -77,7 +77,7 @@ void Kimpanel::updateLookupTable(const KimpanelLookupTable &lookupTable)
}
m_hasPrev
=
lookupTable
.
has_prev
;
m_hasNext
=
lookupTable
.
has_next
;
emit
lookupTableChanged
();
Q_EMIT
lookupTableChanged
();
}
void
Kimpanel
::
updateSpotLocation
(
int
x
,
int
y
)
...
...
@@ -88,14 +88,14 @@ void Kimpanel::updateSpotLocation(int x, int y)
void
Kimpanel
::
updateSpotRect
(
int
x
,
int
y
,
int
w
,
int
h
)
{
m_spotRect
=
QRect
(
x
,
y
,
w
,
h
);
emit
spotRectChanged
();
Q_EMIT
spotRectChanged
();
}
void
Kimpanel
::
showAux
(
bool
visible
)
{
if
(
m_auxVisible
!=
visible
)
{
m_auxVisible
=
visible
;
emit
auxTextChanged
();
Q_EMIT
auxTextChanged
();
}
}
...
...
@@ -103,7 +103,7 @@ void Kimpanel::showPreedit(bool visible)
{
if
(
m_preeditVisible
!=
visible
)
{
m_preeditVisible
=
visible
;
emit
preeditTextChanged
();
Q_EMIT
preeditTextChanged
();
}
}
...
...
@@ -111,7 +111,7 @@ void Kimpanel::showLookupTable(bool visible)
{
if
(
m_lookupTableVisible
!=
visible
)
{
m_lookupTableVisible
=
visible
;
emit
lookupTableChanged
();
Q_EMIT
lookupTableChanged
();
}
}
...
...
@@ -119,7 +119,7 @@ void Kimpanel::updateLookupTableCursor(int cursor)
{
if
(
m_lookupTableCursor
!=
cursor
)
{
m_lookupTableCursor
=
cursor
;
emit
lookupTableChanged
();
Q_EMIT
lookupTableChanged
();
}
}
...
...
@@ -135,7 +135,7 @@ void Kimpanel::updateLookupTableFull(const KimpanelLookupTable &lookupTable, int
m_hasNext
=
lookupTable
.
has_next
;
m_lookupTableCursor
=
cursor
;
m_lookupTableLayout
=
layout
;
emit
lookupTableChanged
();
Q_EMIT
lookupTableChanged
();
}
void
Kimpanel
::
updateProperty
(
const
KimpanelProperty
&
property
)
...
...
@@ -143,7 +143,7 @@ void Kimpanel::updateProperty(const KimpanelProperty &property)
for
(
auto
&
prop
:
m_props
)
{
if
(
prop
.
toMap
()[
QStringLiteral
(
"key"
)]
==
property
.
key
)
{
prop
=
property
.
toMap
();
emit
propertiesChanged
();
Q_EMIT
propertiesChanged
();
break
;
}
}
...
...
@@ -155,7 +155,7 @@ void Kimpanel::registerProperties(const QList<KimpanelProperty> &props)
for
(
const
auto
&
prop
:
props
)
{
m_props
<<
prop
.
toMap
();
}
emit
propertiesChanged
();
Q_EMIT
propertiesChanged
();
}
void
Kimpanel
::
execMenu
(
const
QList
<
KimpanelProperty
>
&
props
)
...
...
@@ -164,7 +164,7 @@ void Kimpanel::execMenu(const QList<KimpanelProperty> &props)
for
(
const
auto
&
prop
:
props
)
{
menuProps
<<
prop
.
toMap
();
}
emit
menuTriggered
(
menuProps
);
Q_EMIT
menuTriggered
(
menuProps
);
}
void
Kimpanel
::
execDialog
(
const
KimpanelProperty
&
prop
)
...
...
applets/kimpanel/plugin/kimpanelagent.cpp
View file @
c594807f
...
...
@@ -110,41 +110,41 @@ void PanelAgent::serviceUnregistered(const QString &service)
m_watcher
->
setWatchedServices
(
QStringList
());
m_cachedProps
.
clear
();
m_currentService
=
QString
();
emit
showAux
(
false
);
emit
showPreedit
(
false
);
emit
showLookupTable
(
false
);
emit
registerProperties
(
QList
<
KimpanelProperty
>
());
Q_EMIT
showAux
(
false
);
Q_EMIT
showPreedit
(
false
);
Q_EMIT
showLookupTable
(
false
);
Q_EMIT
registerProperties
(
QList
<
KimpanelProperty
>
());
}
}
void
PanelAgent
::
configure
()
{
emit
Configure
();
Q_EMIT
Configure
();
}
void
PanelAgent
::
lookupTablePageDown
()
{
emit
LookupTablePageDown
();
Q_EMIT
LookupTablePageDown
();
}
void
PanelAgent
::
lookupTablePageUp
()
{
emit
LookupTablePageUp
();
Q_EMIT
LookupTablePageUp
();
}
void
PanelAgent
::
movePreeditCaret
(
int
pos
)
{
emit
MovePreeditCaret
(
pos
);
Q_EMIT
MovePreeditCaret
(
pos
);
}
void
PanelAgent
::
triggerProperty
(
const
QString
&
key
)
{
emit
TriggerProperty
(
key
);
Q_EMIT
TriggerProperty
(
key
);
}
void
PanelAgent
::
selectCandidate
(
int
idx
)
{
emit
SelectCandidate
(
idx
);
Q_EMIT
SelectCandidate
(
idx
);
}
static
QList
<
TextAttribute
>
String2AttrList
(
const
QString
&
str
)
...
...
@@ -224,33 +224,33 @@ static KimpanelLookupTable Args2LookupTable(const QStringList &labels, const QSt
void
PanelAgent
::
created
()
{
emit
PanelCreated
();
emit
PanelCreated2
();
Q_EMIT
PanelCreated
();
Q_EMIT
PanelCreated2
();
}
void
PanelAgent
::
exit
()
{
emit
Exit
();
Q_EMIT
Exit
();
}
void
PanelAgent
::
reloadConfig
()
{
emit
ReloadConfig
();
Q_EMIT
ReloadConfig
();
}
void
PanelAgent
::
UpdateLookupTable
(
const
QStringList
&
labels
,
const
QStringList
&
candis
,
const
QStringList
&
attrlists
,
bool
has_prev
,
bool
has_next
)
{
emit
updateLookupTable
(
Args2LookupTable
(
labels
,
candis
,
attrlists
,
has_prev
,
has_next
));
Q_EMIT
updateLookupTable
(
Args2LookupTable
(
labels
,
candis
,
attrlists
,
has_prev
,
has_next
));
}
void
PanelAgent
::
UpdatePreeditText
(
const
QString
&
text
,
const
QString
&
attr
)
{
emit
updatePreeditText
(
text
,
String2AttrList
(
attr
));
Q_EMIT
updatePreeditText
(
text
,
String2AttrList
(
attr
));
}
void
PanelAgent
::
UpdateAux
(
const
QString
&
text
,
const
QString
&
attr
)
{
emit
updateAux
(
text
,
String2AttrList
(
attr
));
Q_EMIT
updateAux
(
text
,
String2AttrList
(
attr
));
}
void
PanelAgent
::
UpdateScreen
(
int
screen_id
)
...
...
@@ -260,7 +260,7 @@ void PanelAgent::UpdateScreen(int screen_id)
void
PanelAgent
::
UpdateProperty
(
const
QString
&
prop
)
{
emit
updateProperty
(
String2Property
(
prop
));
Q_EMIT
updateProperty
(
String2Property
(
prop
));
}
void
PanelAgent
::
RegisterProperties
(
const
QStringList
&
props
)
...
...
@@ -269,7 +269,7 @@ void PanelAgent::RegisterProperties(const QStringList &props)
if
(
msg
.
service
()
!=
m_currentService
)
{
m_watcher
->
removeWatchedService
(
m_currentService
);
if
(
m_currentService
.
isEmpty
())
{
emit
PanelRegistered
();
Q_EMIT
PanelRegistered
();
}
m_currentService
=
msg
.
service
();
m_watcher
->
addWatchedService
(
m_currentService
);
...
...
@@ -281,13 +281,13 @@ void PanelAgent::RegisterProperties(const QStringList &props)
list
<<
String2Property
(
prop
);
}
emit
registerProperties
(
list
);
Q_EMIT
registerProperties
(
list
);
}
}
void
PanelAgent
::
ExecDialog
(
const
QString
&
prop
)
{
emit
execDialog
(
String2Property
(
prop
));
Q_EMIT
execDialog
(
String2Property
(
prop
));
}
void
PanelAgent
::
ExecMenu
(
const
QStringList
&
entries
)
...
...
@@ -297,12 +297,12 @@ void PanelAgent::ExecMenu(const QStringList &entries)
list
<<
String2Property
(
entry
);
}
emit
execMenu
(
list
);
Q_EMIT
execMenu
(
list
);
}
void
PanelAgent
::
SetSpotRect
(
int
x
,
int
y
,
int
w
,
int
h
)
{
emit
updateSpotRect
(
x
,
y
,
w
,
h
);
Q_EMIT
updateSpotRect
(
x
,
y
,
w
,
h
);
}
void
PanelAgent
::
SetLookupTable
(
const
QStringList
&
labels
,
...
...
@@ -313,5 +313,5 @@ void PanelAgent::SetLookupTable(const QStringList &labels,
int
cursor
,
int
layout
)
{
emit
updateLookupTableFull
(
Args2LookupTable
(
labels
,
candis
,
attrlists
,
hasPrev
,
hasNext
),
cursor
,
layout
);
Q_EMIT
updateLookupTableFull
(
Args2LookupTable
(
labels
,
candis
,
attrlists
,
hasPrev
,
hasNext
),
cursor
,
layout
);
}
applets/pager/plugin/pagermodel.cpp
View file @
c594807f
...
...
@@ -157,7 +157,7 @@ void PagerModel::Private::refreshDataSource()
QObject
::
disconnect
(
virtualDesktopNamesConn
);
virtualDesktopNamesConn
=
QObject
::
connect
(
virtualDesktopInfo
,
&
VirtualDesktopInfo
::
desktopNamesChanged
,
q
,
[
this
]()
{
if
(
q
->
rowCount
())
{
emit
q
->
dataChanged
(
q
->
index
(
0
,
0
),
q
->
index
(
q
->
rowCount
()
-
1
,
0
),
QVector
<
int
>
{
Qt
::
DisplayRole
});
Q_EMIT
q
->
dataChanged
(
q
->
index
(
0
,
0
),
q
->
index
(
q
->
rowCount
()
-
1
,
0
),
QVector
<
int
>
{
Qt
::
DisplayRole
});
}
});
...
...
@@ -184,7 +184,7 @@ void PagerModel::Private::refreshDataSource()
QObject
::
connect
(
activityInfo
,
&
ActivityInfo
::
currentActivityChanged
,
q
,
&
PagerModel
::
currentPageChanged
,
Qt
::
UniqueConnection
);
}
emit
q
->
currentPageChanged
();
Q_EMIT
q
->
currentPageChanged
();
}
PagerModel
::
PagerModel
(
QObject
*
parent
)
...
...
@@ -252,8 +252,8 @@ void PagerModel::setPagerType(PagerType type)
refresh
();
emit
pagerTypeChanged
();
emit
shouldShowPagerChanged
();
Q_EMIT
pagerTypeChanged
();
Q_EMIT
shouldShowPagerChanged
();
}
}
...
...
@@ -267,7 +267,7 @@ void PagerModel::setEnabled(bool enabled)
if
(
enabled
&&
!
d
->
enabled
)
{
refresh
();
d
->
enabled
=
true
;
emit
enabledChanged
();
Q_EMIT
enabledChanged
();
}
else
if
(
!
enabled
&&
d
->
enabled
)
{
beginResetModel
();
...
...
@@ -282,9 +282,9 @@ void PagerModel::setEnabled(bool enabled)
endResetModel
();
d
->
enabled
=
false
;
emit
enabledChanged
();
Q_EMIT
enabledChanged
();
emit
countChanged
();
Q_EMIT
countChanged
();
}
}
...
...
@@ -303,7 +303,7 @@ void PagerModel::setShowDesktop(bool show)
if
(
d
->
showDesktop
!=
show
)
{
d
->
showDesktop
=
show
;
emit
showDesktopChanged
();
Q_EMIT
showDesktopChanged
();
}
}
...
...
@@ -318,12 +318,12 @@ void PagerModel::setShowOnlyCurrentScreen(bool show)
d
->
showOnlyCurrentScreen
=
show
;
if
(
d
->
screenGeometry
.
isValid
())
{
emit
pagerItemSizeChanged
();
Q_EMIT
pagerItemSizeChanged
();
refresh
();
}
emit
showOnlyCurrentScreenChanged
();
Q_EMIT
showOnlyCurrentScreenChanged
();
}
}
...
...
@@ -338,12 +338,12 @@ void PagerModel::setScreenGeometry(const QRect &geometry)
d
->
screenGeometry
=
geometry
;
if
(
d
->
showOnlyCurrentScreen
)
{
emit
pagerItemSizeChanged
();
Q_EMIT
pagerItemSizeChanged
();
refresh
();
}
emit
showOnlyCurrentScreenChanged
();
Q_EMIT
showOnlyCurrentScreenChanged
();
}
}
...
...
@@ -447,7 +447,7 @@ void PagerModel::refresh()
endResetModel
();
emit
countChanged
();
Q_EMIT
countChanged
();
}
void
PagerModel
::
moveWindow
(
const
QVariant
&
window
,
...
...
applets/pager/plugin/windowmodel.cpp
View file @
c594807f
...
...
@@ -142,6 +142,6 @@ QVariant WindowModel::data(const QModelIndex &index, int role) const
void
WindowModel
::
refreshStackingOrder
()
{
if
(
rowCount
())
{
emit
dataChanged
(
index
(
0
,
0
),
index
(
rowCount
()
-
1
,
0
),
QVector
<
int
>
{
StackingOrder
});
Q_EMIT
dataChanged
(
index
(
0
,
0
),
index
(
rowCount
()
-
1
,
0
),
QVector
<
int
>
{
StackingOrder
});
}
}
applets/taskmanager/plugin/backend.cpp
View file @
c594807f
...
...
@@ -105,7 +105,7 @@ void Backend::setTaskManagerItem(QQuickItem *item)
if
(
item
!=
m_taskManagerItem
)
{
m_taskManagerItem
=
item
;
emit
taskManagerItemChanged
();
Q_EMIT
taskManagerItemChanged
();
}
}
...
...
@@ -119,7 +119,7 @@ void Backend::setGroupDialog(QQuickWindow *dialog)
if
(
dialog
!=
m_groupDialog
)
{
m_groupDialog
=
dialog
;
emit
groupDialogChanged
();
Q_EMIT
groupDialogChanged
();
}
}
...
...
@@ -135,7 +135,7 @@ void Backend::setHighlightWindows(bool highlight)
updateWindowHighlight
();
emit
highlightWindowsChanged
();
Q_EMIT
highlightWindowsChanged
();
}
}
...
...
applets/taskmanager/plugin/draghelper.cpp
View file @
c594807f
...
...
@@ -49,7 +49,7 @@ void DragHelper::setDragIconSize(int size)
if
(
m_dragIconSize
!=
size
)
{
m_dragIconSize
=
size
;
emit
dragIconSizeChanged
();
Q_EMIT
dragIconSizeChanged
();
}
}
...
...
@@ -92,5 +92,5 @@ void DragHelper::startDragInternal(QQuickItem *item, const QString &mimeType, co
grabber
->
ungrabMouse
();
}
emit
dropped
();
Q_EMIT
dropped
();
}
applets/taskmanager/plugin/smartlaunchers/smartlauncherbackend.cpp
View file @
c594807f
...
...
@@ -59,7 +59,7 @@ void Backend::reload()
setupApplicationJobs
();
emit
reloadRequested
(
QString
()
/*all*/
);
Q_EMIT
reloadRequested
(
QString
()
/*all*/
);
}
bool
Backend
::
doNotDisturbMode
()
const
...
...
@@ -209,7 +209,7 @@ void Backend::update(const QString &uri, const QMap<QString, QVariant> &properti
int
saneCount
=
static_cast
<
int
>
(
newCount
);
if
(
saneCount
!=
foundEntry
->
count
)
{
foundEntry
->
count
=
saneCount
;
emit
countChanged
(
storageId
,
saneCount
);
Q_EMIT
countChanged
(
storageId
,
saneCount
);
}
}
}
...
...
@@ -233,7 +233,7 @@ void Backend::update(const QString &uri, const QMap<QString, QVariant> &properti
const
int
newSanitizedProgress
=
progress
(
storageId
);
if
(
oldSanitizedProgress
!=
newSanitizedProgress
)
{
emit
progressChanged
(
storageId
,
newSanitizedProgress
);
Q_EMIT
progressChanged
(
storageId
,
newSanitizedProgress
);
}
}
...
...
@@ -259,5 +259,5 @@ void Backend::onServiceUnregistered(const QString &service)
}
m_launchers
.
remove
(
storageId
);
emit
launcherRemoved
(
storageId
);
Q_EMIT
launcherRemoved
(
storageId
);
}
applets/taskmanager/plugin/smartlaunchers/smartlauncherbackend.h
View file @
c594807f
...
...
@@ -103,7 +103,7 @@ private:
const
T
newSanitizedValue
=
((
this
)
->*
getter
)(
storageId
);
if
(
newSanitizedValue
!=
oldSanitizedValue
)
{
emit
((
this
)
->*
changeSignal
)(
storageId
,
newSanitizedValue
);
Q_EMIT
((
this
)
->*
changeSignal
)(
storageId
,
newSanitizedValue
);
}
}
}
...
...
applets/taskmanager/plugin/smartlaunchers/smartlauncheritem.cpp
View file @
c594807f
...
...
@@ -123,7 +123,7 @@ void Item::setLauncherUrl(const QUrl &launcherUrl)
{
if
(
launcherUrl
!=
m_launcherUrl
)
{
m_launcherUrl
=
launcherUrl
;
emit
launcherUrlChanged
(
launcherUrl
);
Q_EMIT
launcherUrlChanged
(
launcherUrl
);
m_storageId
.
clear
();
clear
();
...
...
@@ -171,7 +171,7 @@ void Item::setCount(int count)
{
if
(
m_count
!=
count
)
{
m_count
=
count
;
emit
countChanged
(
count
);
Q_EMIT
countChanged
(
count
);
}
}
...
...
@@ -184,7 +184,7 @@ void Item::setCountVisible(bool countVisible)
{
if
(
m_countVisible
!=
countVisible
)
{
m_countVisible
=
countVisible
;
emit
countVisibleChanged
(
countVisible
);
Q_EMIT
countVisibleChanged
(
countVisible
);
}
}
...
...
@@ -197,7 +197,7 @@ void Item::setProgress(int progress)
{
if
(
m_progress
!=
progress
)
{
m_progress
=
progress
;
emit
progressChanged
(
progress
);
Q_EMIT
progressChanged
(
progress
);
}
}
...
...
@@ -210,7 +210,7 @@ void Item::setProgressVisible(bool progressVisible)
{
if
(
m_progressVisible
!=
progressVisible
)
{
m_progressVisible
=
progressVisible
;
emit
progressVisibleChanged
(
progressVisible
);
Q_EMIT
progressVisibleChanged
(
progressVisible
);
}
}
...
...
@@ -223,6 +223,6 @@ void Item::setUrgent(bool urgent)
{
if
(
m_urgent
!=
urgent
)
{
m_urgent
=
urgent
;
emit
urgentChanged
(
urgent
);
Q_EMIT
urgentChanged
(
urgent
);
}
}
applets/trash/plugin/dirmodel.cpp
View file @
c594807f
...
...
@@ -93,7 +93,7 @@ void DirModel::setUrl(const QString &url)
beginResetModel
();
dirLister
()
->
openUrl
(
QUrl
(
url
));
endResetModel
();
emit
urlChanged
();
Q_EMIT
urlChanged
();
}
int
DirModel
::
indexForUrl
(
const
QString
&
url
)
const
...
...
@@ -194,7 +194,7 @@ void DirModel::showPreview(const KFileItem &item, const QPixmap &preview)
m_imageCache
->
insertImage
(
item
.
url
().
toString
(),
preview
.
toImage
());
// qDebug() << "preview size:" << preview.size();
emit
dataChanged
(
index
,
index
);
Q_EMIT
dataChanged
(
index
,
index
);
}
void
DirModel
::
previewFailed
(
const
KFileItem
&
item
)
...
...
containments/desktop/package/contents/ui/ConfigOverlay.qml
View file @
c594807f
...
...
@@ -261,7 +261,7 @@ ContainmentLayoutManager.ConfigOverlayWithHandles {
// we don't set action, since we want to catch the button click,
// animate, and then trigger the "remove" action
// Triggering the action is handled in the overlay.itemContainer, we just
//
emit
a signal here to avoid the applet-gets-removed-before-we-
//
Q_EMIT
a signal here to avoid the applet-gets-removed-before-we-
// can-animate it race condition.
onClicked
:
{
removeAnim
.
restart
();
...
...
containments/desktop/plugins/desktop/infonotification.cpp
View file @
c594807f
...
...
@@ -42,7 +42,7 @@ void InfoNotification::setEnabled(bool enabled)
if
(
m_enabled
!=
enabled
)
{
m_enabled
=
enabled
;
emit
enabledChanged
();
Q_EMIT
enabledChanged
();
}
}
...
...
@@ -74,7 +74,7 @@ void InfoNotification::setIconName(const QString &iconName)
if
(
m_iconName
!=
iconName
)
{
m_iconName
=
iconName
;
emit
iconNameChanged
();
Q_EMIT
iconNameChanged
();
}
}
...
...
@@ -88,7 +88,7 @@ void InfoNotification::setTitleText(const QString &titleText)
if
(
m_titleText
!=
titleText
)
{
m_titleText
=
titleText
;
emit
titleTextChanged
();
Q_EMIT
titleTextChanged
();
}
}
...
...
@@ -102,7 +102,7 @@ void InfoNotification::setText(const QString &text)
if
(
m_text
!=
text
)
{
m_text
=
text
;
emit
textChanged
();
Q_EMIT
textChanged
();
}
}
...
...
@@ -116,6 +116,6 @@ void InfoNotification::setAcknowledgeActionText(const QString &acknowledgeAction
if
(
m_acknowledgeActionText
!=
acknowledgeActionText
)
{
m_acknowledgeActionText
=
acknowledgeActionText
;
emit
acknowledgeActionTextChanged
();
Q_EMIT
acknowledgeActionTextChanged
();
}
}
containments/desktop/plugins/folder/directorypicker.cpp
View file @
c594807f
...
...
@@ -61,6 +61,6 @@ void DirectoryPicker::dialogAccepted()
if
(
!
urls
.
isEmpty
())
{
m_url
=
urls
.
at
(
0
);
emit
urlChanged
();
Q_EMIT
urlChanged
();
}
}
containments/desktop/plugins/folder/foldermodel.cpp
View file @
c594807f
...
...
@@ -95,7 +95,7 @@ DirLister::~DirLister()
void
DirLister
::
handleError
(
KIO
::
Job
*
job
)
{
if
(
!
autoErrorHandlingEnabled
())
{
emit
error
(
job
->
errorString
());
Q_EMIT
error
(
job
->
errorString
());
return
;
}
...
...
@@ -139,13 +139,13 @@ FolderModel::FolderModel(QObject *parent)
void
(
KCoreDirLister
::*
myCompletedSignal
)()
=
&
KCoreDirLister
::
completed
;
QObject
::
connect
(
dirLister
,
myCompletedSignal
,
this
,
[
this
]
{
setStatus
(
Status
::
Ready
);
emit
listingCompleted
();
Q_EMIT
listingCompleted
();
});
void
(
KCoreDirLister
::*
myCanceledSignal
)()
=
&
KCoreDirLister
::
canceled
;
QObject
::
connect
(
dirLister
,
myCanceledSignal
,
this
,
[
this
]
{
setStatus
(
Status
::
Canceled
);
emit
listingCanceled
();
Q_EMIT
listingCanceled
();
});
m_dirModel
=
new
KDirModel
(
this
);
...
...
@@ -168,7 +168,7 @@ FolderModel::FolderModel(QObject *parent)
if
(
it
!=
m_dropTargetPositions
.
end
())
{
const
auto
pos
=
it
.
value
();
m_dropTargetPositions
.
erase
(
it
);
emit
move
(
pos
.
x
(),
pos
.
y
(),
{
url
});
Q_EMIT
move
(
pos
.
x
(),
pos
.
y
(),
{
url
});
}
}
});
...
...
@@ -318,11 +318,11 @@ void FolderModel::setUrl(const QString &url)
m_dragIndexes
.
clear
();
endResetModel
();