Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
KAlarm
Commits
5086d966
Commit
5086d966
authored
Jun 25, 2015
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use QStringLiteral
parent
1bceb10f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
functions.cpp
functions.cpp
+1
-1
mainwindow.cpp
mainwindow.cpp
+1
-1
No files found.
functions.cpp
View file @
5086d966
...
...
@@ -1612,7 +1612,7 @@ FileType fileType(const KMimeType::Ptr& mimetype)
return
TextApplication
;
if
(
mimetype
->
is
(
QLatin1String
(
"text/plain"
)))
return
TextPlain
;
if
(
mimetype
->
name
().
startsWith
(
Q
Latin1
String
(
"image/"
)))
if
(
mimetype
->
name
().
startsWith
(
QString
Literal
(
"image/"
)))
return
Image
;
return
Unknown
;
}
...
...
mainwindow.cpp
View file @
5086d966
...
...
@@ -1357,7 +1357,7 @@ void MainWindow::executeDropEvent(MainWindow* win, QDropEvent* e)
qCDebug
(
KALARM_LOG
)
<<
"URL"
;
// Try to find the mime type of the file, without downloading a remote file
KMimeType
::
Ptr
mimeType
=
KMimeType
::
findByUrl
(
files
[
0
]);
action
=
mimeType
->
name
().
startsWith
(
Q
Latin1
String
(
"audio/"
))
?
KAEvent
::
AUDIO
:
KAEvent
::
FILE
;
action
=
mimeType
->
name
().
startsWith
(
QString
Literal
(
"audio/"
))
?
KAEvent
::
AUDIO
:
KAEvent
::
FILE
;
alarmText
.
setText
(
files
[
0
].
prettyUrl
());
}
else
if
(
data
->
hasText
())
...
...
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