A modern, network-enabled music player platform built on Rockbox technology. rockboxd.tsiry-sandratraina.com
rust deno navidrome airplay libadwaita zig mpris snapcast mpd rockbox audio subsonic
2

Configure Feed

Select the types of activity you want to include in your feed.

rockboxd / utils / regtools / qeditor / main.cpp
2.4 kB 59 lines
1/*************************************************************************** 2 * __________ __ ___. 3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 * \/ \/ \/ \/ \/ 8 * 9 * Copyright (C) 2014 by Amaury Pouly 10 * 11 * This program is free software; you can redistribute it and/or 12 * modify it under the terms of the GNU General Public License 13 * as published by the Free Software Foundation; either version 2 14 * of the License, or (at your option) any later version. 15 * 16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 17 * KIND, either express or implied. 18 * 19 ****************************************************************************/ 20#include <QApplication> 21#include <QDir> 22#include <QTextCodec> 23#include "mainwindow.h" 24 25int main(int argc, char *argv[]) 26{ 27 QApplication app(argc, argv); 28 app.setApplicationVersion(APP_VERSION); 29#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 30 /** NOTE: Qt4 only 31 * use the locale codec as the C-string codec, otherwise QString::toStdString() 32 * performs as toLatin1() which breaks conversion on virtually all systems. 33 * FIXME The documentation mentions that the C-string codec should produce ASCII 34 * compatible (ie 7-bit) encodings but nowadays most system are using UTF-8 35 * so I don't see why this is a problem */ 36 QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale()); 37#endif 38 39 Backend backend;; 40 QDir dir(QCoreApplication::applicationDirPath()); 41 dir.cdUp(); 42 dir.cd("desc"); 43 dir.setFilter(QDir::Files); 44 QFileInfoList list = dir.entryInfoList(); 45 for(int i = 0; i < list.size(); i++) 46 { 47 QFileInfo fileInfo = list.at(i); 48 if(fileInfo.fileName().right(4) != ".xml" || fileInfo.fileName().left(5) != "regs-") 49 continue; 50 backend.LoadSocDesc(fileInfo.absoluteFilePath()); 51 } 52 53 QCoreApplication::setOrganizationName("Rockbox"); 54 QCoreApplication::setApplicationName("Register Editor"); 55 QCoreApplication::setOrganizationDomain("rockbox.org"); 56 MainWindow win(&backend); 57 win.show(); 58 return app.exec(); 59}