aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/Input/aac/decoderaacfactory.cpp2
-rw-r--r--src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp2
-rw-r--r--src/plugins/Input/flac/decoderflacfactory.cpp2
-rw-r--r--src/plugins/Input/mpc/decodermpcfactory.cpp2
-rw-r--r--src/plugins/Input/mpeg/decodermpegfactory.cpp2
-rw-r--r--src/plugins/Input/opus/decoderopusfactory.cpp2
-rw-r--r--src/plugins/Input/sndfile/decodersndfilefactory.cpp2
-rw-r--r--src/plugins/Input/vorbis/decodervorbisfactory.cpp4
-rw-r--r--src/plugins/Input/wavpack/decoderwavpackfactory.cpp2
-rw-r--r--src/qmmp/decoder.h6
-rw-r--r--src/qmmp/eqsettings.h10
-rw-r--r--src/qmmp/inputsource.h8
-rw-r--r--src/qmmp/metadatamanager.h14
-rw-r--r--src/qmmp/metadatamodel.h5
-rw-r--r--src/qmmp/qmmpsettings.h13
-rw-r--r--src/qmmp/tagmodel.h3
-rw-r--r--src/qmmp/trackinfo.cpp6
-rw-r--r--src/qmmp/trackinfo.h3
-rw-r--r--src/qmmp/volume.cpp2
-rw-r--r--src/qmmp/volume.h14
-rw-r--r--src/qmmp/volumehandler.h27
-rw-r--r--src/qmmpui/commandlinehandler.h2
-rw-r--r--src/qmmpui/fileloader.cpp8
-rw-r--r--src/qmmpui/playlistparser.h5
-rw-r--r--src/qmmpui/playlisttask.cpp4
-rw-r--r--src/qmmpui/uihelper.h4
26 files changed, 103 insertions, 51 deletions
diff --git a/src/plugins/Input/aac/decoderaacfactory.cpp b/src/plugins/Input/aac/decoderaacfactory.cpp
index e69c4e9a3..c01064125 100644
--- a/src/plugins/Input/aac/decoderaacfactory.cpp
+++ b/src/plugins/Input/aac/decoderaacfactory.cpp
@@ -55,7 +55,7 @@ QList<TrackInfo *> DecoderAACFactory::createPlayList(const QString &path, TrackI
{
TrackInfo *info = new TrackInfo(path);
- if(parts == TrackInfo::NoParts)
+ if(parts == TrackInfo::Parts())
return QList<TrackInfo*>() << info;
QFile file(path);
diff --git a/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp b/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp
index fcdc91bf1..29379fb74 100644
--- a/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp
+++ b/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp
@@ -180,7 +180,7 @@ QList<TrackInfo *> DecoderFFmpegFactory::createPlayList(const QString &path, Tra
TrackInfo *info = new TrackInfo(filePath);
- if(parts == TrackInfo::NoParts)
+ if(parts == TrackInfo::Parts())
return QList<TrackInfo*>() << info;
AVFormatContext *in = nullptr;
diff --git a/src/plugins/Input/flac/decoderflacfactory.cpp b/src/plugins/Input/flac/decoderflacfactory.cpp
index f51883f22..ab5836186 100644
--- a/src/plugins/Input/flac/decoderflacfactory.cpp
+++ b/src/plugins/Input/flac/decoderflacfactory.cpp
@@ -83,7 +83,7 @@ QList<TrackInfo*> DecoderFLACFactory::createPlayList(const QString &path, TrackI
TrackInfo *info = new TrackInfo(filePath);
- if(parts == TrackInfo::NoParts)
+ if(parts == TrackInfo::Parts())
return QList<TrackInfo *>() << info;
TagLib::Ogg::XiphComment *tag = nullptr;
diff --git a/src/plugins/Input/mpc/decodermpcfactory.cpp b/src/plugins/Input/mpc/decodermpcfactory.cpp
index 4f430354a..a272b43c5 100644
--- a/src/plugins/Input/mpc/decodermpcfactory.cpp
+++ b/src/plugins/Input/mpc/decodermpcfactory.cpp
@@ -63,7 +63,7 @@ QList<TrackInfo *> DecoderMPCFactory::createPlayList(const QString &path, TrackI
{
TrackInfo *info = new TrackInfo(path);
- if(parts == TrackInfo::NoParts)
+ if(parts == TrackInfo::Parts())
return QList<TrackInfo*>() << info;
TagLib::FileStream stream(QStringToFileName(path), true);
diff --git a/src/plugins/Input/mpeg/decodermpegfactory.cpp b/src/plugins/Input/mpeg/decodermpegfactory.cpp
index 8d21e7bc3..6a280deb7 100644
--- a/src/plugins/Input/mpeg/decodermpegfactory.cpp
+++ b/src/plugins/Input/mpeg/decodermpegfactory.cpp
@@ -209,7 +209,7 @@ QList<TrackInfo *> DecoderMPEGFactory::createPlayList(const QString &path, Track
{
TrackInfo *info = new TrackInfo(path);
- if(parts == TrackInfo::NoParts)
+ if(parts == TrackInfo::Parts())
return QList<TrackInfo*>() << info;
TagLib::Tag *tag = nullptr;
diff --git a/src/plugins/Input/opus/decoderopusfactory.cpp b/src/plugins/Input/opus/decoderopusfactory.cpp
index 6e62a97a4..b7a724583 100644
--- a/src/plugins/Input/opus/decoderopusfactory.cpp
+++ b/src/plugins/Input/opus/decoderopusfactory.cpp
@@ -64,7 +64,7 @@ QList<TrackInfo *> DecoderOpusFactory::createPlayList(const QString &path, Track
{
TrackInfo *info = new TrackInfo(path);
- if(parts == TrackInfo::NoParts)
+ if(parts == TrackInfo::Parts())
return QList<TrackInfo*>() << info;
TagLib::Ogg::Opus::File fileRef(QStringToFileName(path));
diff --git a/src/plugins/Input/sndfile/decodersndfilefactory.cpp b/src/plugins/Input/sndfile/decodersndfilefactory.cpp
index f6d2f221f..309fcf848 100644
--- a/src/plugins/Input/sndfile/decodersndfilefactory.cpp
+++ b/src/plugins/Input/sndfile/decodersndfilefactory.cpp
@@ -137,7 +137,7 @@ QList<TrackInfo *> DecoderSndFileFactory::createPlayList(const QString &path, Tr
{
TrackInfo *info = new TrackInfo(path);
- if(parts == TrackInfo::NoParts)
+ if(parts == TrackInfo::Parts())
return QList<TrackInfo*>() << info;
SF_INFO snd_info;
diff --git a/src/plugins/Input/vorbis/decodervorbisfactory.cpp b/src/plugins/Input/vorbis/decodervorbisfactory.cpp
index 64e33492f..a810a6462 100644
--- a/src/plugins/Input/vorbis/decodervorbisfactory.cpp
+++ b/src/plugins/Input/vorbis/decodervorbisfactory.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008-2019 by Ilya Kotov *
+ * Copyright (C) 2008-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -66,7 +66,7 @@ QList<TrackInfo *> DecoderVorbisFactory::createPlayList(const QString &path, Tra
{
TrackInfo *info = new TrackInfo(path);
- if(parts == TrackInfo::NoParts)
+ if(parts == TrackInfo::Parts())
return QList<TrackInfo*>() << info;
TagLib::FileStream stream(QStringToFileName(path), true);
diff --git a/src/plugins/Input/wavpack/decoderwavpackfactory.cpp b/src/plugins/Input/wavpack/decoderwavpackfactory.cpp
index 5218c86eb..274b3faad 100644
--- a/src/plugins/Input/wavpack/decoderwavpackfactory.cpp
+++ b/src/plugins/Input/wavpack/decoderwavpackfactory.cpp
@@ -69,7 +69,7 @@ QList<TrackInfo *> DecoderWavPackFactory::createPlayList(const QString &path, Tr
TrackInfo *info = new TrackInfo(filePath);
- if(parts == TrackInfo::NoParts)
+ if(parts == TrackInfo::Parts())
return QList<TrackInfo *>() << info;
char err[80] = { 0 };
diff --git a/src/qmmp/decoder.h b/src/qmmp/decoder.h
index 44403691b..61a60ef38 100644
--- a/src/qmmp/decoder.h
+++ b/src/qmmp/decoder.h
@@ -121,13 +121,13 @@ public:
*/
const QMap<Qmmp::TrackProperty, QString> &properties() const;
/*!
- * Returns DecoderFactory pointer which supports file \b path or 0 if file \b path is unsupported
+ * Returns DecoderFactory pointer which supports file \b path or nullptr if file \b path is unsupported
* @param path Full local file path.
* @param useContent Content-based file type determination (\b true - enabled, \b false - disabled)
*/
static DecoderFactory *findByFilePath(const QString &path, bool useContent = false);
/*!
- * Returns DecoderFactory pointer which supports mime type \b mime or \b 0 if mime type \b mime is unsupported
+ * Returns DecoderFactory pointer which supports mime type \b mime or \b nullptr if mime type \b mime is unsupported
*/
static DecoderFactory *findByMime(const QString &mime);
/*!
@@ -136,7 +136,7 @@ public:
*/
static DecoderFactory *findByContent(QIODevice *input);
/*!
- * Returns DecoderFactory pointer which supports protocol \b p or \b 0 if \b url is not supported.
+ * Returns DecoderFactory pointer which supports protocol \b p or \b nullptr if \b protocol is not supported.
*/
static DecoderFactory *findByProtocol(const QString &p);
/*!
diff --git a/src/qmmp/eqsettings.h b/src/qmmp/eqsettings.h
index 5fec23d8e..e15bc1ffb 100644
--- a/src/qmmp/eqsettings.h
+++ b/src/qmmp/eqsettings.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2010-2019 by Ilya Kotov *
+ * Copyright (C) 2010-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -49,7 +49,7 @@ public:
*/
EqSettings(Bands bands = EQ_BANDS_10);
/*!
- * Returns \b true if equalizer os enabled, otherwise returns \b false.
+ * Returns \b true if equalizer is enabled, otherwise returns \b false.
*/
bool isEnabled() const;
/*!
@@ -64,6 +64,9 @@ public:
* Returns number of bands
*/
int bands() const;
+ /*!
+ * Returns \b true if two passes is enabled, otherwise returns \b false.
+ */
bool twoPasses() const;
/*!
* Enables equalizer if \p enabled is \b true or disables it if \p enabled is \b false.
@@ -79,6 +82,9 @@ public:
* Sets equalizer preamp to \b preamp.
*/
void setPreamp(double preamp);
+ /*!
+ * Enables two passes for equalizer if \p enabled is \b true or disables it if \p enabled is \b false.
+ */
void setTwoPasses(bool enabled = true);
/*!
* Assigns equalizer settings \b s to this settings.
diff --git a/src/qmmp/inputsource.h b/src/qmmp/inputsource.h
index 4fbff6e45..c5811c795 100644
--- a/src/qmmp/inputsource.h
+++ b/src/qmmp/inputsource.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2009-2019 by Ilya Kotov *
+ * Copyright (C) 2009-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -135,7 +135,13 @@ public:
* Returns a list of supported protocols.
*/
static QStringList protocols();
+ /*!
+ * Returns a list of supported regular expressions for URL.
+ */
static QList<QRegularExpression> regExps();
+ /*!
+ * Returns InputSourceFactory pointer which supports URL \b url or \b nullptr if \b URL is not supported.
+ */
static InputSourceFactory *findByUrl(const QString &url);
/*!
* Sets whether the input plugin is enabled.
diff --git a/src/qmmp/metadatamanager.h b/src/qmmp/metadatamanager.h
index eafbb7c63..b642c6775 100644
--- a/src/qmmp/metadatamanager.h
+++ b/src/qmmp/metadatamanager.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2009-2019 by Ilya Kotov *
+ * Copyright (C) 2009-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -70,6 +70,9 @@ public:
* Returns a list of the suported protocols
*/
QStringList protocols() const;
+ /*!
+ * Returns a list of supported regular expressions for URL.
+ */
QList<QRegularExpression> regExps() const;
/*!
* Returns \b true if \b file is supported and exists, otherwise returns \b false
@@ -104,9 +107,14 @@ public:
* Prepares object for usage by another thread to avoid warnings about parent from the different thread
*/
void prepareForAnotherThread();
-
+ /*!
+ * Returns \b true if the one regular expression in the list \b regExps matched against the \b path or \b false otherwise.
+ */
static bool hasMatch(const QList<QRegularExpression> &regExps, const QString &path);
- static bool hasMatch(const QList<QRegExp> &re, const QString &path);
+ /*!
+ * Returns \b true if the one regular expression in the list \b regExps matched against the \b path or \b false otherwise.
+ */
+ static bool hasMatch(const QList<QRegExp> &regExps, const QString &path);
/*!
* Returns a pointer to the MetaDataManager instance.
*/
diff --git a/src/qmmp/metadatamodel.h b/src/qmmp/metadatamodel.h
index 2cde53e5e..b5128f05d 100644
--- a/src/qmmp/metadatamodel.h
+++ b/src/qmmp/metadatamodel.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2009-2019 by Ilya Kotov *
+ * Copyright (C) 2009-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -85,7 +85,6 @@ public:
*/
enum DialogHint
{
- NoHints = 0x0, /*!< Default value. */
IsCoverEditable = 0x1, /*!< Enable cover editor. */
CompletePropertyList = 0x2 /*!< Show properties from \b extraProperties() only (ignore other sources) */
};
@@ -95,7 +94,7 @@ public:
* @param readOnly Open file in read-only mode (\b true - enabled, \b false - disable).
* @param hints Details dialog settings.
*/
- MetaDataModel(bool readOnly, DialogHints hints = NoHints);
+ MetaDataModel(bool readOnly, DialogHints hints = DialogHints());
/*!
* Destructor.
*/
diff --git a/src/qmmp/qmmpsettings.h b/src/qmmp/qmmpsettings.h
index 97e33f282..7a4f9c785 100644
--- a/src/qmmp/qmmpsettings.h
+++ b/src/qmmp/qmmpsettings.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2010-2019 by Ilya Kotov *
+ * Copyright (C) 2010-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -46,10 +46,13 @@ public:
REPLAYGAIN_DISABLED /*!< Disable ReplayGain */
};
+ /*!
+ * This enum describes proxy types.
+ */
enum ProxyType
{
- HTTP_PROXY = 0,
- SOCKS5_PROXY
+ HTTP_PROXY = 0, /*!< HTTP proxy */
+ SOCKS5_PROXY /*!< SOCKS5 proxy */
};
/*!
* Constructor.
@@ -139,11 +142,15 @@ public:
* Returns global proxy url.
*/
const QUrl &proxy() const;
+ /*!
+ * Returls global proxy type.
+ */
ProxyType proxyType() const;
/*!
* Sets network settings.
* @param use_proxy Enables or disables global proxy.
* @param auth Enables or disables proxy authentication.
+ * @param type Proxy type.
* @param proxy Proxy url.
*/
void setNetworkSettings(bool use_proxy, bool auth, ProxyType type, const QUrl &proxy);
diff --git a/src/qmmp/tagmodel.h b/src/qmmp/tagmodel.h
index 089a62d81..5fc4393fa 100644
--- a/src/qmmp/tagmodel.h
+++ b/src/qmmp/tagmodel.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2009-2019 by Ilya Kotov *
+ * Copyright (C) 2009-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -37,7 +37,6 @@ public:
*/
enum ModelCap
{
- NoOptions = 0x0, /*!< No capabilities */
CreateRemove = 0x1, /*!< Can create/remove tag */
Save = 0x2, /*!< Can save changes */
DefaultCaps = CreateRemove | Save,
diff --git a/src/qmmp/trackinfo.cpp b/src/qmmp/trackinfo.cpp
index 4bb7fcf4e..9c9d3a13f 100644
--- a/src/qmmp/trackinfo.cpp
+++ b/src/qmmp/trackinfo.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2018-2019 by Ilya Kotov *
+ * Copyright (C) 2018-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -24,14 +24,14 @@
TrackInfo::TrackInfo()
{
m_duration = 0;
- m_parts = NoParts;
+ m_parts = Parts();
}
TrackInfo::TrackInfo(const QString &path)
{
m_path = path;
m_duration = 0;
- m_parts = NoParts;
+ m_parts = Parts();
}
TrackInfo::TrackInfo(const TrackInfo &other)
diff --git a/src/qmmp/trackinfo.h b/src/qmmp/trackinfo.h
index 329e813d4..1201f777e 100644
--- a/src/qmmp/trackinfo.h
+++ b/src/qmmp/trackinfo.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2018-2019 by Ilya Kotov *
+ * Copyright (C) 2018-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -52,7 +52,6 @@ public:
*/
enum Part
{
- NoParts = 0x0, /*!< No parts. */
MetaData = 0x1, /*!< Metadata (artist, album, etc). */
Properties = 0x2, /*!< File/Stream properties. */
ReplayGainInfo = 0x4, /*!< ReplayGain information. */
diff --git a/src/qmmp/volume.cpp b/src/qmmp/volume.cpp
index ddea0a6f1..bbc3933ea 100644
--- a/src/qmmp/volume.cpp
+++ b/src/qmmp/volume.cpp
@@ -32,5 +32,5 @@ void Volume::setMuted(bool mute)
Volume::VolumeFlags Volume::flags() const
{
- return Volume::NoFlags;
+ return Volume::VolumeFlags();
}
diff --git a/src/qmmp/volume.h b/src/qmmp/volume.h
index fd82cca87..623577e26 100644
--- a/src/qmmp/volume.h
+++ b/src/qmmp/volume.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2012-2019 by Ilya Kotov *
+ * Copyright (C) 2012-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -52,10 +52,12 @@ class QMMP_EXPORT Volume : public QObject
{
Q_OBJECT
public:
+ /*!
+ * This enum describes volume capabilities.
+ */
enum VolumeFlag
{
- NoFlags = 0x0,
- IsMuteSupported = 0x1,
+ IsMuteSupported = 0x1, /*!< Indicates the interface has feature to mute audio */
HasNotifySignal = 0x2, /*!< Indicates the object supports change notification via
* emitting changed() signal so polling the volume is not needed */
};
@@ -74,12 +76,18 @@ public:
* Returns volume level of the \b channel.
*/
virtual VolumeSettings volume() const = 0;
+ /*!
+ * Returns \b true if volume is disabled. Otherwise returns \b false.
+ */
virtual bool isMuted() const;
/*!
* Mutes/Restores volume. Default implementation does nothing.
* @param mute - state of volume (\b true - mute, \b false - restore)
*/
virtual void setMuted(bool mute);
+ /*!
+ * Returns volume flags.
+ */
virtual VolumeFlags flags() const;
signals:
diff --git a/src/qmmp/volumehandler.h b/src/qmmp/volumehandler.h
index 3c509359d..9e9105106 100644
--- a/src/qmmp/volumehandler.h
+++ b/src/qmmp/volumehandler.h
@@ -60,7 +60,7 @@ public:
void changeVolume(int delta);
/*!
* Sets the volume of the left and right channels with keeping of the balance.
- * @param volume volume of the left and right channels \b[0..100].
+ * @param volume volume of the left and right channels \b [0..100].
*/
void setVolume(int volume);
/*!
@@ -68,6 +68,9 @@ public:
* @param balance balance between left and right channels \b [-100..100].
*/
void setBalance(int balance);
+ /*!
+ * Sets volume mute state to \b muted.
+ */
void setMuted(bool muted);
/*!
* Returns left channel volume.
@@ -85,11 +88,19 @@ public:
* Returns the balance between left and right channels.
*/
int balance() const;
-
+ /*!
+ * Returns \b true if volume is muted, otherwise returns \b false.
+ */
bool isMuted() const;
-
+ /*!
+ * Changes buffer volume (software mode only).
+ * \param b \b Buffer pointer.
+ * \param chan \b Number of channels.
+ */
void apply(Buffer *b, int chan);
-
+ /*!
+ * Returns a pointer to the global VolumeHandler instance.
+ */
static VolumeHandler *instance();
signals:
@@ -101,14 +112,18 @@ signals:
void volumeChanged(int left, int right);
/*!
* Emitted when the highest volume of the left and right channels has changed.
- * @param volume new value of the highest volume of the left and right channels.
+ * @param volume New value of the highest volume of the left and right channels.
*/
void volumeChanged(int volume);
/*!
* Emitted when the balance between left and right channels has changed.
- * @param volume new balance value.
+ * @param balance New balance value.
*/
void balanceChanged(int balance);
+ /*!
+ * Emitted when volume mute state has changed
+ * \param muted New volume mute state.
+ */
void mutedChanged(bool muted);
public slots:
diff --git a/src/qmmpui/commandlinehandler.h b/src/qmmpui/commandlinehandler.h
index 300ad00c7..2787c0513 100644
--- a/src/qmmpui/commandlinehandler.h
+++ b/src/qmmpui/commandlinehandler.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008-2019 by Ilya Kotov *
+ * Copyright (C) 2008-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
diff --git a/src/qmmpui/fileloader.cpp b/src/qmmpui/fileloader.cpp
index ecd92dc19..761569bf9 100644
--- a/src/qmmpui/fileloader.cpp
+++ b/src/qmmpui/fileloader.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2006-2019 by Ilya Kotov *
+ * Copyright (C) 2006-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -35,7 +35,7 @@ FileLoader::FileLoader(QObject *parent) : QThread(parent)
m_settings = QmmpUiSettings::instance();
m_finished = false;
m_readMetaDataForPlayLists = true;
- m_parts = TrackInfo::NoParts;
+ m_parts = TrackInfo::Parts();
connect(qApp, SIGNAL(aboutToQuit()), SLOT(finish()));
}
@@ -305,7 +305,7 @@ void FileLoader::addPlayList(const QString &fmt, const QByteArray &data)
MetaDataManager::instance()->prepareForAnotherThread();
PlayListParser::loadFormats();
m_filters = MetaDataManager::instance()->nameFilters();
- m_parts = m_settings->useMetaData() ? TrackInfo::AllParts : TrackInfo::NoParts;
+ m_parts = m_settings->useMetaData() ? TrackInfo::AllParts : TrackInfo::Parts();
m_readMetaDataForPlayLists = m_settings->readMetaDataForPlayLists();
}
start(QThread::IdlePriority);
@@ -332,7 +332,7 @@ void FileLoader::insert(PlayListItem *before, const QStringList &paths)
{
MetaDataManager::instance()->prepareForAnotherThread();
m_filters = MetaDataManager::instance()->nameFilters();
- m_parts = m_settings->useMetaData() ? TrackInfo::AllParts : TrackInfo::NoParts;
+ m_parts = m_settings->useMetaData() ? TrackInfo::AllParts : TrackInfo::Parts();
m_readMetaDataForPlayLists = m_settings->readMetaDataForPlayLists();
}
start(QThread::IdlePriority);
diff --git a/src/qmmpui/playlistparser.h b/src/qmmpui/playlistparser.h
index 64cb4cbbf..88ba6b95d 100644
--- a/src/qmmpui/playlistparser.h
+++ b/src/qmmpui/playlistparser.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008-2019 by Ilya Kotov *
+ * Copyright (C) 2008-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -40,6 +40,9 @@ public:
* Returns a list of the supported files name filters, i.e. "*.m3u *.pls"
*/
static QStringList nameFilters();
+ /*!
+ * Returns a list of file name filters with description, i.e. "M3U (*.m3u)"
+ */
static QStringList filters();
/*!
* Returns \b true if file \b url is playlist. Otherwise returns \b false.
diff --git a/src/qmmpui/playlisttask.cpp b/src/qmmpui/playlisttask.cpp
index 37b543b85..9933476a7 100644
--- a/src/qmmpui/playlisttask.cpp
+++ b/src/qmmpui/playlisttask.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2014-2019 by Ilya Kotov *
+ * Copyright (C) 2014-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -465,7 +465,7 @@ void PlayListTask::run()
//create new playlist tracks
QStringList ignoredFiles;
- TrackInfo::Parts parts = QmmpUiSettings::instance()->useMetaData() ? TrackInfo::AllParts : TrackInfo::NoParts;
+ TrackInfo::Parts parts = QmmpUiSettings::instance()->useMetaData() ? TrackInfo::AllParts : TrackInfo::Parts();
for(const QFileInfo &f : qAsConst(l))
{
QStringList ignored;
diff --git a/src/qmmpui/uihelper.h b/src/qmmpui/uihelper.h
index 2367b62f4..1b1f76f69 100644
--- a/src/qmmpui/uihelper.h
+++ b/src/qmmpui/uihelper.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008-2019 by Ilya Kotov *
+ * Copyright (C) 2008-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -86,6 +86,7 @@ public:
* Creates menu with type \b type
* @param type Menu type.
* @param title Menu title.
+ * @param autoHide Hide empty menu.
* @param parent Parent widget
*/
QMenu *createMenu(MenuType type, const QString &title = QString(), bool autoHide = true, QWidget *parent = nullptr);
@@ -93,6 +94,7 @@ public:
* Registers existing menu for access from general plugins.
* @param type Menu type.
* @param menu Menu pointer.
+ * @param autoHide Hide empty menu.
* @param before An action, after which the rest are added.
*/
void registerMenu(MenuType type, QMenu *menu, bool autoHide = false, QAction *before = nullptr);