use QStandardPaths to get resource locations (#44)
* use QStandardPaths to get resource locations While this shouldn't change behaviour for windows, it allows installing the resource files seperate from the binary on unix systems * initialize battery overlay handles to 0
This commit is contained in:
+5
-2
@@ -411,8 +411,11 @@ int main( int argc, char* argv[] )
|
||||
advsettings::OverlayController controller(
|
||||
desktopMode, noSound, qmlEngine );
|
||||
|
||||
QQmlComponent component(
|
||||
&qmlEngine, QUrl::fromLocalFile( "res/qml/mainwidget.qml" ) );
|
||||
QString path = QStandardPaths::locate(
|
||||
QStandardPaths::AppDataLocation,
|
||||
QStringLiteral( "res/qml/mainwidget.qml" ) );
|
||||
|
||||
QQmlComponent component( &qmlEngine, QUrl::fromLocalFile( path ) );
|
||||
auto errors = component.errors();
|
||||
for ( auto& e : errors )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user