mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kutils: constify KMediaPlayer::isMimeSupported()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
4253ed731e
commit
4f06efd99d
2 changed files with 8 additions and 8 deletions
|
@ -193,9 +193,9 @@ void KAbstractPlayer::setFullscreen(bool fullscreen)
|
|||
}
|
||||
|
||||
/*
|
||||
Since exposing mpv_handle is not desirable and sigals/slots cannot be virtual here are some
|
||||
pre-processor definitions used to share the code as much as possible making modifications
|
||||
easier
|
||||
Since exposing mpv_handle is not desirable and sigals/slots cannot be virtual nor multiple
|
||||
QObject inheritance works here are some pre-processor definitions used to share the code as
|
||||
much as possible making modifications easier
|
||||
*/
|
||||
#define COMMON_CONSTRUCTOR \
|
||||
setlocale(LC_NUMERIC, "C"); \
|
||||
|
@ -384,7 +384,7 @@ void KAudioPlayer::_processHandleEvents()
|
|||
COMMMON_EVENT_HANDLER
|
||||
}
|
||||
|
||||
bool KAudioPlayer::isMimeSupported(QString mime) const
|
||||
bool KAudioPlayer::isMimeSupported(const QString mime) const
|
||||
{
|
||||
return mime.startsWith("audio/") || mime == QLatin1String("application/octet-stream");
|
||||
}
|
||||
|
@ -463,7 +463,7 @@ void KMediaPlayer::_processHandleEvents()
|
|||
COMMMON_EVENT_HANDLER
|
||||
}
|
||||
|
||||
bool KMediaPlayer::isMimeSupported(QString mime) const
|
||||
bool KMediaPlayer::isMimeSupported(const QString mime) const
|
||||
{
|
||||
return mime.startsWith("audio/") || mime.startsWith("video/")
|
||||
|| mime == QLatin1String("application/octet-stream");
|
||||
|
|
|
@ -162,7 +162,7 @@ public:
|
|||
quotes)
|
||||
@return Whether the MIME type is supported
|
||||
*/
|
||||
virtual bool isMimeSupported(QString mime) const = 0;
|
||||
virtual bool isMimeSupported(const QString mime) const = 0;
|
||||
/*!
|
||||
@note You can obtain the scheme, which is the same as the meaning of protocol here, from a
|
||||
KUrl/QUrl via url.scheme(). If you pass "http://" instead of just "http" the protocol will
|
||||
|
@ -232,7 +232,7 @@ public:
|
|||
QVariant property(const QString& name) const;
|
||||
void setOption(const QString& name, const QVariant& value) const;
|
||||
|
||||
bool isMimeSupported(QString mime) const;
|
||||
bool isMimeSupported(const QString mime) const;
|
||||
|
||||
signals:
|
||||
//! @brief Signals that a path was loaded
|
||||
|
@ -298,7 +298,7 @@ public:
|
|||
QVariant property(const QString& name) const;
|
||||
void setOption(const QString& name, const QVariant& value) const;
|
||||
|
||||
bool isMimeSupported(QString mime) const;
|
||||
bool isMimeSupported(const QString mime) const;
|
||||
|
||||
signals:
|
||||
//! @brief Signals that a path was loaded
|
||||
|
|
Loading…
Add table
Reference in a new issue