Add namespace comments

This commit is contained in:
Jonas Kvinge 2021-06-20 23:55:02 +02:00
parent e1bf4347ab
commit 50be44adf8
11 changed files with 18 additions and 12 deletions

View File

@ -71,7 +71,7 @@ using namespace std::chrono_literals;
namespace {
static const char *kNoMediaFile = ".nomedia";
static const char *kNoMusicFile = ".nomusic";
}
} // namespace
QStringList CollectionWatcher::sValidImages = QStringList() << "jpg" << "png" << "gif" << "jpeg";

View File

@ -213,7 +213,7 @@ const char *MainWindow::kAllFilesFilterSpec = QT_TR_NOOP("All Files (*)");
namespace {
const int kTrackSliderUpdateTimeMs = 200;
const int kTrackPositionUpdateTimeMs = 1000;
}
} // namespace
MainWindow::MainWindow(Application *app, std::shared_ptr<SystemTrayIcon> tray_icon, OSDBase *osd, const CommandlineOptions &options, QWidget *parent) :
QMainWindow(parent),

View File

@ -551,7 +551,7 @@ QDBusObjectPath MakePlaylistPath(int id) {
return QDBusObjectPath(QString("/org/strawberrymusicplayer/strawberry/PlaylistId/%1").arg(id));
}
}
} // namespace
MaybePlaylist Mpris2::ActivePlaylist() const {

View File

@ -207,7 +207,7 @@ QString GetIpodModel(Itdb_IpodModel model) {
}
#endif
}
} // namespace
QUrl DeviceLister::MakeUrlFromLocalPath(const QString &path) const {

View File

@ -51,4 +51,4 @@ QString EngineDescription(Engine::EngineType enginetype) {
}
}
}
} // namespace Engine

View File

@ -69,7 +69,7 @@ quint32 AppRootWindow() {
}
}
} // namespace
quint32 GlobalShortcut::nativeModifiers(Qt::KeyboardModifiers qt_mods) {

View File

@ -350,6 +350,7 @@ QMimeData *InternetSearchModel::mimeData(const QModelIndexList &indexes) const {
}
namespace {
void GatherResults(const QStandardItem *parent, InternetSearchView::ResultList *results) {
QVariant result_variant = parent->data(InternetSearchModel::Role_Result);
@ -361,8 +362,10 @@ void GatherResults(const QStandardItem *parent, InternetSearchView::ResultList *
for (int i = 0 ; i < parent->rowCount() ; ++i) {
GatherResults(parent->child(i), results);
}
}
}
} // namespace
void InternetSearchModel::SetGroupBy(const CollectionModel::Grouping grouping, const bool regroup_now) {

View File

@ -124,7 +124,8 @@ struct IdSource {
QString id_;
int nb_sources_;
};
}
} // namespace
void AcoustidClient::RequestFinished(QNetworkReply *reply, const int request_id) {

View File

@ -1885,6 +1885,7 @@ void Playlist::Shuffle() {
}
namespace {
bool AlbumShuffleComparator(const QMap<QString, int> &album_key_positions, const QMap<int, QString> &album_keys, const int left, const int right) {
const int left_pos = album_key_positions[album_keys[left]];
@ -1894,7 +1895,8 @@ bool AlbumShuffleComparator(const QMap<QString, int> &album_key_positions, const
return left_pos < right_pos;
}
}
} // namespace
void Playlist::ReshuffleIndices() {

View File

@ -135,4 +135,4 @@ ShuffleItems::ShuffleItems(Playlist *playlist, const PlaylistItemList &new_items
setText(tr("shuffle songs"));
}
} // namespace
} // namespace PlaylistUndoCommands

View File

@ -193,8 +193,8 @@ namespace Amarok {
namespace ColorScheme {
extern QColor Background;
extern QColor Foreground;
}
}
} // namespace ColorScheme
} // namespace Amarok
#if 0
/** these functions aren't required in our fixed size world, but they may become useful one day **/