Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Utilities
Filelight
Commits
30c12371
Commit
30c12371
authored
Sep 29, 2020
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port some deprecated method
parent
d1643a1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
CMakeLists.txt
CMakeLists.txt
+2
-2
src/radialMap/widgetEvents.cpp
src/radialMap/widgetEvents.cpp
+10
-10
No files found.
CMakeLists.txt
View file @
30c12371
...
...
@@ -31,8 +31,8 @@ cmake_minimum_required (VERSION 3.5 FATAL_ERROR)
project
(
Filelight VERSION
${
FILELIGHT_VERSION
}
)
set
(
PROJECT_VERSION
${
RELEASE_SERVICE_VERSION
}
)
set
(
KF5_MIN_VERSION
"5.
46
.0"
)
set
(
QT_REQUIRED_VERSION
"5.1
1
.0"
)
set
(
KF5_MIN_VERSION
"5.
71
.0"
)
set
(
QT_REQUIRED_VERSION
"5.1
2
.0"
)
find_package
(
ECM
${
KF5_MIN_VERSION
}
REQUIRED NO_MODULE
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
${
ECM_MODULE_PATH
}
)
...
...
src/radialMap/widgetEvents.cpp
View file @
30c12371
...
...
@@ -28,12 +28,12 @@
#include <KJob>
#include <KIO/Job> //::mousePressEvent()
#include <KIO//DeleteJob>
#include <KIO/JobUiDelegate>
#include <KMessageBox> //::mousePressEvent()
#include <QMenu> //::mousePressEvent()
#include <KRun> //::mousePressEvent()
#include <KToolInvocation>
#include <QUrl>
#include <KIO/JobUiDelegate>
#include <KIO/OpenUrlJob>
#include <KLocalizedString>
#include <kio_version.h>
...
...
@@ -278,8 +278,9 @@ void RadialMap::Widget::mousePressEvent(QMouseEvent *e)
// Open file
if
(
e
->
button
()
==
Qt
::
MiddleButton
||
(
e
->
button
()
==
Qt
::
LeftButton
&&
!
isDir
))
{
new
KRun
(
url
,
this
,
true
);
auto
*
job
=
new
KIO
::
OpenUrlJob
(
QUrl
(
url
));
job
->
setUiDelegate
(
new
KIO
::
JobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
this
));
job
->
start
();
return
;
}
...
...
@@ -340,11 +341,8 @@ void RadialMap::Widget::mousePressEvent(QMouseEvent *e)
QAction
*
clicked
=
popup
.
exec
(
e
->
globalPos
(),
nullptr
);
if
(
openFileManager
&&
clicked
==
openFileManager
)
{
KRun
::
runUrl
(
url
,
QStringLiteral
(
"inode/directory"
),
this
#if KIO_VERSION >= QT_VERSION_CHECK(5, 31, 0)
,
KRun
::
RunFlags
()
#endif
);
auto
*
job
=
new
KIO
::
OpenUrlJob
(
url
,
QStringLiteral
(
"inode/directory"
),
this
);
job
->
start
();
}
else
if
(
openTerminal
&&
clicked
==
openTerminal
)
{
KToolInvocation
::
invokeTerminal
(
QString
(),
url
.
path
());
}
else
if
(
centerMap
&&
clicked
==
centerMap
)
{
...
...
@@ -356,7 +354,9 @@ void RadialMap::Widget::mousePressEvent(QMouseEvent *e)
Config
::
write
();
}
}
else
if
(
openFile
&&
clicked
==
openFile
)
{
new
KRun
(
url
,
this
,
true
);
auto
*
job
=
new
KIO
::
OpenUrlJob
(
url
);
job
->
setUiDelegate
(
new
KIO
::
JobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
this
));
job
->
start
();
}
else
if
(
clicked
==
copyClipboard
)
{
QMimeData
*
mimedata
=
new
QMimeData
();
mimedata
->
setUrls
(
QList
<
QUrl
>
()
<<
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