AppSettings for android

added debug output for Navigation as debugger does not work for Android
yet
This commit is contained in:
Jan-Martin Raemer 2022-06-01 20:31:47 +02:00
parent 75308b4423
commit 9e7a55fc20
8 changed files with 405 additions and 90 deletions

View file

@ -21,11 +21,17 @@ NavigationController::NavigationController(QObject *parent) : QObject(parent),
});
}
void NavigationController::setDebugOutput(const QString& text)
{
mDebugOutput = text;
emit debugOutputChanged();
}
void NavigationController::init(const QString &rootPath)
{
auto rootDir = QDir(rootPath);
if(!rootDir.exists()) return;
mRootPath = rootPath;
mRootPath = rootPath;
add(mRootPath, mRootItem);
@ -49,6 +55,7 @@ void NavigationController::setContextProperties()
mContext->setContextProperty("navigationList", mNavList);
mContext->setContextProperty("uiStateModel", mUiState);
mContext->setContextProperty("musicModel", mMediaPlayer);
mContext->setContextProperty("debug", this);
}
void NavigationController::add(const QString &path, NavigationItemModel *parentItem)