From 76507bd6029c131c8d828f0982bd8b1dd8500506 Mon Sep 17 00:00:00 2001 From: Vasily Date: Sat, 2 Feb 2019 13:31:02 +0100 Subject: [PATCH 1/5] Move common elements into /common/ and change imports Elements work like they've always done, this just moves the commonly used components away from the global namespace. The qmldir file still does something, although at this point it is unknown exactly how it's used and whether or not it could be changed to simplify imports across the block. --- advancedSettings.pro | 1 + src/main.cpp | 2 +- src/res/qml/AccessibilityPage.qml | 2 +- src/res/qml/ChaperonePage.qml | 1 + src/res/qml/ChaperoneWarningsPage.qml | 1 + src/res/qml/FixFloorPage.qml | 2 +- src/res/qml/PlayspacePage.qml | 2 +- src/res/qml/RevivePage.qml | 2 +- src/res/qml/RootPage.qml | 1 + src/res/qml/SettingsPage.qml | 2 +- src/res/qml/StatisticsPage.qml | 2 +- src/res/qml/SteamVRPage.qml | 1 + src/res/qml/audio_page/AudioPage.qml | 2 +- .../qml/audio_page/device_selector/AudioDeviceSelector.qml | 2 +- src/res/qml/audio_page/device_selector/MicDeviceSelector.qml | 2 +- src/res/qml/audio_page/device_selector/MicVolumeSlider.qml | 2 +- .../qml/audio_page/device_selector/MirrorDeviceSelector.qml | 2 +- .../qml/audio_page/device_selector/MirrorVolumeSlider.qml | 2 +- .../qml/audio_page/dialog_boxes/AudioDeleteProfileDialog.qml | 2 +- src/res/qml/audio_page/dialog_boxes/AudioMessageDialog.qml | 2 +- .../qml/audio_page/dialog_boxes/AudioNewProfileDialog.qml | 2 +- .../qml/audio_page/dialog_boxes/PttDeleteProfileDialog.qml | 2 +- src/res/qml/audio_page/dialog_boxes/PttNewProfileDialog.qml | 2 +- src/res/qml/audio_page/profiles/ProfileButtons.qml | 2 +- src/res/qml/audio_page/proximity/ProximityToggle.qml | 2 +- src/res/qml/audio_page/push_to_talk/PttButtons.qml | 3 ++- src/res/qml/{ => common}/LineSeparator.qml | 0 src/res/qml/{ => common}/MyComboBox.qml | 0 src/res/qml/{ => common}/MyDialogOkCancelPopup.qml | 0 src/res/qml/{ => common}/MyDialogOkPopup.qml | 0 src/res/qml/{ => common}/MyPushButton.qml | 0 src/res/qml/{ => common}/MyPushButton2.qml | 0 src/res/qml/{ => common}/MyResources.qml | 0 src/res/qml/{ => common}/MySlider.qml | 0 src/res/qml/{ => common}/MyStackViewPage.qml | 2 ++ src/res/qml/{ => common}/MyText.qml | 0 src/res/qml/{ => common}/MyTextField.qml | 0 src/res/qml/{ => common}/MyToggleButton.qml | 3 ++- src/res/qml/{ => common}/PttControllerConfigDialog.qml | 0 src/res/qml/{ => common}/backarrow.svg | 0 src/res/qml/{ => common}/check.svg | 0 src/res/qml/{ => common}/mainwidget.qml | 5 +++-- src/res/qml/qmldir | 2 +- src/res/qml/utilities_page/UtilitiesPage.qml | 2 +- src/res/qml/utilities_page/alarm_clock/AlarmGroupBox.qml | 2 +- .../qml/utilities_page/desktop_size/SteamDesktopGroupBox.qml | 2 +- .../qml/utilities_page/keyboard_utils/KeyboardGroupBox.qml | 2 +- src/res/qml/utilities_page/media_keys/MediaButton.qml | 3 +-- .../qml/utilities_page/media_keys/MediaControllerKeys.qml | 3 +-- 49 files changed, 41 insertions(+), 33 deletions(-) rename src/res/qml/{ => common}/LineSeparator.qml (100%) rename src/res/qml/{ => common}/MyComboBox.qml (100%) rename src/res/qml/{ => common}/MyDialogOkCancelPopup.qml (100%) rename src/res/qml/{ => common}/MyDialogOkPopup.qml (100%) rename src/res/qml/{ => common}/MyPushButton.qml (100%) rename src/res/qml/{ => common}/MyPushButton2.qml (100%) rename src/res/qml/{ => common}/MyResources.qml (100%) rename src/res/qml/{ => common}/MySlider.qml (100%) rename src/res/qml/{ => common}/MyStackViewPage.qml (97%) rename src/res/qml/{ => common}/MyText.qml (100%) rename src/res/qml/{ => common}/MyTextField.qml (100%) rename src/res/qml/{ => common}/MyToggleButton.qml (95%) rename src/res/qml/{ => common}/PttControllerConfigDialog.qml (100%) rename src/res/qml/{ => common}/backarrow.svg (100%) rename src/res/qml/{ => common}/check.svg (100%) rename src/res/qml/{ => common}/mainwidget.qml (97%) diff --git a/advancedSettings.pro b/advancedSettings.pro index d17cf62..4a48a5a 100644 --- a/advancedSettings.pro +++ b/advancedSettings.pro @@ -169,3 +169,4 @@ DISTFILES += \ src/res/qml/audio_page/proximity/* \ src/res/qml/audio_page/push_to_talk/* \ src/res/qml/audio_page/profiles/* \ + src/res/qml/common/* \ diff --git a/src/main.cpp b/src/main.cpp index cbc85c6..19d7670 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -425,7 +425,7 @@ int main( int argc, char* argv[] ) QString path = QStandardPaths::locate( QStandardPaths::AppDataLocation, - QStringLiteral( "res/qml/mainwidget.qml" ) ); + QStringLiteral( "res/qml/common/mainwidget.qml" ) ); QQmlComponent component( &qmlEngine, QUrl::fromLocalFile( path ) ); auto errors = component.errors(); diff --git a/src/res/qml/AccessibilityPage.qml b/src/res/qml/AccessibilityPage.qml index 7e59d8b..0a458eb 100644 --- a/src/res/qml/AccessibilityPage.qml +++ b/src/res/qml/AccessibilityPage.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 - +import "common" MyStackViewPage { diff --git a/src/res/qml/ChaperonePage.qml b/src/res/qml/ChaperonePage.qml index 6fbe5ef..a7e60a2 100644 --- a/src/res/qml/ChaperonePage.qml +++ b/src/res/qml/ChaperonePage.qml @@ -4,6 +4,7 @@ import QtQuick.Layouts 1.3 import QtQuick.Dialogs 1.2 import matzman666.advsettings 1.0 import "." // QTBUG-34418, singletons require explicit import to load qmldir file +import "common" MyStackViewPage { headerText: "Chaperone Settings" diff --git a/src/res/qml/ChaperoneWarningsPage.qml b/src/res/qml/ChaperoneWarningsPage.qml index 1064838..426b45b 100644 --- a/src/res/qml/ChaperoneWarningsPage.qml +++ b/src/res/qml/ChaperoneWarningsPage.qml @@ -4,6 +4,7 @@ import QtQuick.Layouts 1.3 import QtQuick.Dialogs 1.2 import matzman666.advsettings 1.0 import "." // QTBUG-34418, singletons require explicit import to load qmldir file +import "common" MyStackViewPage { headerText: "Chaperone Proximity Warning Settings" diff --git a/src/res/qml/FixFloorPage.qml b/src/res/qml/FixFloorPage.qml index aa1704f..6e2889a 100644 --- a/src/res/qml/FixFloorPage.qml +++ b/src/res/qml/FixFloorPage.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 - +import "common" MyStackViewPage { diff --git a/src/res/qml/PlayspacePage.qml b/src/res/qml/PlayspacePage.qml index bd58685..a60b094 100644 --- a/src/res/qml/PlayspacePage.qml +++ b/src/res/qml/PlayspacePage.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 - +import "common" MyStackViewPage { diff --git a/src/res/qml/RevivePage.qml b/src/res/qml/RevivePage.qml index 46f1c93..b85783b 100644 --- a/src/res/qml/RevivePage.qml +++ b/src/res/qml/RevivePage.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 - +import "common" MyStackViewPage { headerText: "Revive Settings" diff --git a/src/res/qml/RootPage.qml b/src/res/qml/RootPage.qml index af391c7..257eaed 100644 --- a/src/res/qml/RootPage.qml +++ b/src/res/qml/RootPage.qml @@ -3,6 +3,7 @@ import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 import "." // QTBUG-34418, singletons require explicit import to load qmldir file +import "common" import "utilities_page" import "audio_page" diff --git a/src/res/qml/SettingsPage.qml b/src/res/qml/SettingsPage.qml index 9f067e2..250edf3 100644 --- a/src/res/qml/SettingsPage.qml +++ b/src/res/qml/SettingsPage.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 - +import "common" MyStackViewPage { headerText: "Application Settings" diff --git a/src/res/qml/StatisticsPage.qml b/src/res/qml/StatisticsPage.qml index 5d2773e..fb18b40 100644 --- a/src/res/qml/StatisticsPage.qml +++ b/src/res/qml/StatisticsPage.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 - +import "common" MyStackViewPage { diff --git a/src/res/qml/SteamVRPage.qml b/src/res/qml/SteamVRPage.qml index 4119631..7230f55 100644 --- a/src/res/qml/SteamVRPage.qml +++ b/src/res/qml/SteamVRPage.qml @@ -2,6 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 +import "common" MyStackViewPage { id: myStackViewPage1 diff --git a/src/res/qml/audio_page/AudioPage.qml b/src/res/qml/audio_page/AudioPage.qml index dbec66b..54c6efa 100644 --- a/src/res/qml/audio_page/AudioPage.qml +++ b/src/res/qml/audio_page/AudioPage.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import ".." //common imports +import "../common" import "device_selector" import "proximity" import "push_to_talk" diff --git a/src/res/qml/audio_page/device_selector/AudioDeviceSelector.qml b/src/res/qml/audio_page/device_selector/AudioDeviceSelector.qml index 0313b16..34b8861 100644 --- a/src/res/qml/audio_page/device_selector/AudioDeviceSelector.qml +++ b/src/res/qml/audio_page/device_selector/AudioDeviceSelector.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import "../.." // common imports +import "../../common" RowLayout { id: audioPlaybackNameCombo diff --git a/src/res/qml/audio_page/device_selector/MicDeviceSelector.qml b/src/res/qml/audio_page/device_selector/MicDeviceSelector.qml index 8f0179a..53e8613 100644 --- a/src/res/qml/audio_page/device_selector/MicDeviceSelector.qml +++ b/src/res/qml/audio_page/device_selector/MicDeviceSelector.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import "../.." //common imports +import "../../common" RowLayout { id: audioMicNameCombo diff --git a/src/res/qml/audio_page/device_selector/MicVolumeSlider.qml b/src/res/qml/audio_page/device_selector/MicVolumeSlider.qml index d78f8a1..ce0a684 100644 --- a/src/res/qml/audio_page/device_selector/MicVolumeSlider.qml +++ b/src/res/qml/audio_page/device_selector/MicVolumeSlider.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import "../.." //common imports +import "../../common" ColumnLayout { spacing: 18 diff --git a/src/res/qml/audio_page/device_selector/MirrorDeviceSelector.qml b/src/res/qml/audio_page/device_selector/MirrorDeviceSelector.qml index 51dd936..d27acde 100644 --- a/src/res/qml/audio_page/device_selector/MirrorDeviceSelector.qml +++ b/src/res/qml/audio_page/device_selector/MirrorDeviceSelector.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import "../.." //common imports +import "../../common" RowLayout { id: audioMirrorNameCombo diff --git a/src/res/qml/audio_page/device_selector/MirrorVolumeSlider.qml b/src/res/qml/audio_page/device_selector/MirrorVolumeSlider.qml index 8709f4b..7add052 100644 --- a/src/res/qml/audio_page/device_selector/MirrorVolumeSlider.qml +++ b/src/res/qml/audio_page/device_selector/MirrorVolumeSlider.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import "../.." //common imports +import "../../common" import "." ColumnLayout { diff --git a/src/res/qml/audio_page/dialog_boxes/AudioDeleteProfileDialog.qml b/src/res/qml/audio_page/dialog_boxes/AudioDeleteProfileDialog.qml index 32fc49c..7067252 100644 --- a/src/res/qml/audio_page/dialog_boxes/AudioDeleteProfileDialog.qml +++ b/src/res/qml/audio_page/dialog_boxes/AudioDeleteProfileDialog.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import "../.." //common imports +import "../../common" MyDialogOkCancelPopup { id: audioDeleteProfileDialog diff --git a/src/res/qml/audio_page/dialog_boxes/AudioMessageDialog.qml b/src/res/qml/audio_page/dialog_boxes/AudioMessageDialog.qml index c9cc549..1753410 100644 --- a/src/res/qml/audio_page/dialog_boxes/AudioMessageDialog.qml +++ b/src/res/qml/audio_page/dialog_boxes/AudioMessageDialog.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import "../.." //common imports +import "../../common" MyDialogOkPopup { id: audioMessageDialog diff --git a/src/res/qml/audio_page/dialog_boxes/AudioNewProfileDialog.qml b/src/res/qml/audio_page/dialog_boxes/AudioNewProfileDialog.qml index d899de1..1b03952 100644 --- a/src/res/qml/audio_page/dialog_boxes/AudioNewProfileDialog.qml +++ b/src/res/qml/audio_page/dialog_boxes/AudioNewProfileDialog.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import "../.." //common imports +import "../../common" MyDialogOkCancelPopup { id: audioNewProfileDialog diff --git a/src/res/qml/audio_page/dialog_boxes/PttDeleteProfileDialog.qml b/src/res/qml/audio_page/dialog_boxes/PttDeleteProfileDialog.qml index 9d53ea5..ad28477 100644 --- a/src/res/qml/audio_page/dialog_boxes/PttDeleteProfileDialog.qml +++ b/src/res/qml/audio_page/dialog_boxes/PttDeleteProfileDialog.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import "../.." //common imports +import "../../common" MyDialogOkCancelPopup { id: pttDeleteProfileDialog diff --git a/src/res/qml/audio_page/dialog_boxes/PttNewProfileDialog.qml b/src/res/qml/audio_page/dialog_boxes/PttNewProfileDialog.qml index 45ef8d3..a2d293f 100644 --- a/src/res/qml/audio_page/dialog_boxes/PttNewProfileDialog.qml +++ b/src/res/qml/audio_page/dialog_boxes/PttNewProfileDialog.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import "../.." //common imports +import "../../common" MyDialogOkCancelPopup { id: pttNewProfileDialog diff --git a/src/res/qml/audio_page/profiles/ProfileButtons.qml b/src/res/qml/audio_page/profiles/ProfileButtons.qml index 87c6cae..b7c3d84 100644 --- a/src/res/qml/audio_page/profiles/ProfileButtons.qml +++ b/src/res/qml/audio_page/profiles/ProfileButtons.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import "../.." //common imports +import "../../common" import "../dialog_boxes" ColumnLayout { diff --git a/src/res/qml/audio_page/proximity/ProximityToggle.qml b/src/res/qml/audio_page/proximity/ProximityToggle.qml index 1ce982f..d6734c8 100644 --- a/src/res/qml/audio_page/proximity/ProximityToggle.qml +++ b/src/res/qml/audio_page/proximity/ProximityToggle.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import "../.." //common imports +import "../../common" MyToggleButton { id: audioMuteProximitySensorToggle diff --git a/src/res/qml/audio_page/push_to_talk/PttButtons.qml b/src/res/qml/audio_page/push_to_talk/PttButtons.qml index 9378cde..37e84e6 100644 --- a/src/res/qml/audio_page/push_to_talk/PttButtons.qml +++ b/src/res/qml/audio_page/push_to_talk/PttButtons.qml @@ -2,7 +2,8 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import "../.." //common imports +import "../../common" + ColumnLayout { RowLayout { PttControllerConfigDialog { diff --git a/src/res/qml/LineSeparator.qml b/src/res/qml/common/LineSeparator.qml similarity index 100% rename from src/res/qml/LineSeparator.qml rename to src/res/qml/common/LineSeparator.qml diff --git a/src/res/qml/MyComboBox.qml b/src/res/qml/common/MyComboBox.qml similarity index 100% rename from src/res/qml/MyComboBox.qml rename to src/res/qml/common/MyComboBox.qml diff --git a/src/res/qml/MyDialogOkCancelPopup.qml b/src/res/qml/common/MyDialogOkCancelPopup.qml similarity index 100% rename from src/res/qml/MyDialogOkCancelPopup.qml rename to src/res/qml/common/MyDialogOkCancelPopup.qml diff --git a/src/res/qml/MyDialogOkPopup.qml b/src/res/qml/common/MyDialogOkPopup.qml similarity index 100% rename from src/res/qml/MyDialogOkPopup.qml rename to src/res/qml/common/MyDialogOkPopup.qml diff --git a/src/res/qml/MyPushButton.qml b/src/res/qml/common/MyPushButton.qml similarity index 100% rename from src/res/qml/MyPushButton.qml rename to src/res/qml/common/MyPushButton.qml diff --git a/src/res/qml/MyPushButton2.qml b/src/res/qml/common/MyPushButton2.qml similarity index 100% rename from src/res/qml/MyPushButton2.qml rename to src/res/qml/common/MyPushButton2.qml diff --git a/src/res/qml/MyResources.qml b/src/res/qml/common/MyResources.qml similarity index 100% rename from src/res/qml/MyResources.qml rename to src/res/qml/common/MyResources.qml diff --git a/src/res/qml/MySlider.qml b/src/res/qml/common/MySlider.qml similarity index 100% rename from src/res/qml/MySlider.qml rename to src/res/qml/common/MySlider.qml diff --git a/src/res/qml/MyStackViewPage.qml b/src/res/qml/common/MyStackViewPage.qml similarity index 97% rename from src/res/qml/MyStackViewPage.qml rename to src/res/qml/common/MyStackViewPage.qml index b30140a..e2c8202 100644 --- a/src/res/qml/MyStackViewPage.qml +++ b/src/res/qml/common/MyStackViewPage.qml @@ -2,6 +2,8 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.2 import "." // QTBUG-34418, singletons require explicit import to load qmldir file +// Needed for MyResources in the default folder. +import ".." Rectangle { color: "#1b2939" diff --git a/src/res/qml/MyText.qml b/src/res/qml/common/MyText.qml similarity index 100% rename from src/res/qml/MyText.qml rename to src/res/qml/common/MyText.qml diff --git a/src/res/qml/MyTextField.qml b/src/res/qml/common/MyTextField.qml similarity index 100% rename from src/res/qml/MyTextField.qml rename to src/res/qml/common/MyTextField.qml diff --git a/src/res/qml/MyToggleButton.qml b/src/res/qml/common/MyToggleButton.qml similarity index 95% rename from src/res/qml/MyToggleButton.qml rename to src/res/qml/common/MyToggleButton.qml index 0dd6961..15bc180 100644 --- a/src/res/qml/MyToggleButton.qml +++ b/src/res/qml/common/MyToggleButton.qml @@ -1,7 +1,8 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import "." // QTBUG-34418, singletons require explicit import to load qmldir file - +// Needed for MyResources in the default folder. +import ".." CheckBox { checkState: Qt.Checked diff --git a/src/res/qml/PttControllerConfigDialog.qml b/src/res/qml/common/PttControllerConfigDialog.qml similarity index 100% rename from src/res/qml/PttControllerConfigDialog.qml rename to src/res/qml/common/PttControllerConfigDialog.qml diff --git a/src/res/qml/backarrow.svg b/src/res/qml/common/backarrow.svg similarity index 100% rename from src/res/qml/backarrow.svg rename to src/res/qml/common/backarrow.svg diff --git a/src/res/qml/check.svg b/src/res/qml/common/check.svg similarity index 100% rename from src/res/qml/check.svg rename to src/res/qml/common/check.svg diff --git a/src/res/qml/mainwidget.qml b/src/res/qml/common/mainwidget.qml similarity index 97% rename from src/res/qml/mainwidget.qml rename to src/res/qml/common/mainwidget.qml index 91953b5..3853a84 100644 --- a/src/res/qml/mainwidget.qml +++ b/src/res/qml/common/mainwidget.qml @@ -1,8 +1,9 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.0 -import "utilities_page" -import "audio_page" +import ".." +import "../utilities_page" +import "../audio_page" Rectangle { id: root diff --git a/src/res/qml/qmldir b/src/res/qml/qmldir index ec338c0..0c28c5d 100644 --- a/src/res/qml/qmldir +++ b/src/res/qml/qmldir @@ -1 +1 @@ -singleton MyResources 1.0 MyResources.qml \ No newline at end of file +singleton MyResources 1.0 common/MyResources.qml diff --git a/src/res/qml/utilities_page/UtilitiesPage.qml b/src/res/qml/utilities_page/UtilitiesPage.qml index 146d60d..bbbe178 100644 --- a/src/res/qml/utilities_page/UtilitiesPage.qml +++ b/src/res/qml/utilities_page/UtilitiesPage.qml @@ -6,7 +6,7 @@ import "media_keys" import "alarm_clock" import "desktop_size" import "keyboard_utils" -import ".." +import "../common" MyStackViewPage { headerText: "Utilities" diff --git a/src/res/qml/utilities_page/alarm_clock/AlarmGroupBox.qml b/src/res/qml/utilities_page/alarm_clock/AlarmGroupBox.qml index 445c25f..0a24306 100644 --- a/src/res/qml/utilities_page/alarm_clock/AlarmGroupBox.qml +++ b/src/res/qml/utilities_page/alarm_clock/AlarmGroupBox.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import "../.." +import "../../common" GroupBox { id: alarmGroupBox diff --git a/src/res/qml/utilities_page/desktop_size/SteamDesktopGroupBox.qml b/src/res/qml/utilities_page/desktop_size/SteamDesktopGroupBox.qml index b43a0c2..e05cfd7 100644 --- a/src/res/qml/utilities_page/desktop_size/SteamDesktopGroupBox.qml +++ b/src/res/qml/utilities_page/desktop_size/SteamDesktopGroupBox.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import "../.." +import "../../common" GroupBox { id: steamDesktopGroupBox diff --git a/src/res/qml/utilities_page/keyboard_utils/KeyboardGroupBox.qml b/src/res/qml/utilities_page/keyboard_utils/KeyboardGroupBox.qml index 9100064..6d912af 100644 --- a/src/res/qml/utilities_page/keyboard_utils/KeyboardGroupBox.qml +++ b/src/res/qml/utilities_page/keyboard_utils/KeyboardGroupBox.qml @@ -2,7 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -import "../.." +import "../../common" GroupBox { id: keyboardGroupBox diff --git a/src/res/qml/utilities_page/media_keys/MediaButton.qml b/src/res/qml/utilities_page/media_keys/MediaButton.qml index 6536290..c1f94bc 100644 --- a/src/res/qml/utilities_page/media_keys/MediaButton.qml +++ b/src/res/qml/utilities_page/media_keys/MediaButton.qml @@ -2,8 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -// Necessary for the project specific Components. -import "../.." +import "../../common" MyPushButton2 { // Public properties diff --git a/src/res/qml/utilities_page/media_keys/MediaControllerKeys.qml b/src/res/qml/utilities_page/media_keys/MediaControllerKeys.qml index 0e0f094..a22c4ae 100644 --- a/src/res/qml/utilities_page/media_keys/MediaControllerKeys.qml +++ b/src/res/qml/utilities_page/media_keys/MediaControllerKeys.qml @@ -2,8 +2,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import matzman666.advsettings 1.0 -// Necessary for the project specific Components. -import "../.." +import "../../common" GroupBox { id: mediaKeysGroupBox From e0768a38b334a0da37ce67dd80153713e45cf5b6 Mon Sep 17 00:00:00 2001 From: Vasily Date: Sat, 2 Feb 2019 14:16:46 +0100 Subject: [PATCH 2/5] Move checkmark and back arrow into .qrc file The QRC file is a platform independant way of referring to resource files. It allows the program to access resources in an abstract way instead of the direct file path. This is the first step towards moving all files to the new system. --- advancedSettings.pro | 4 ++-- src/res/{qml => img}/common/backarrow.svg | 0 src/res/{qml => img}/common/check.svg | 0 src/res/qml/common/MyStackViewPage.qml | 2 +- src/res/qml/common/MyToggleButton.qml | 2 +- src/res/resources.qrc | 6 ++++++ 6 files changed, 10 insertions(+), 4 deletions(-) rename src/res/{qml => img}/common/backarrow.svg (100%) rename src/res/{qml => img}/common/check.svg (100%) create mode 100644 src/res/resources.qrc diff --git a/advancedSettings.pro b/advancedSettings.pro index 4a48a5a..e93c00d 100644 --- a/advancedSettings.pro +++ b/advancedSettings.pro @@ -126,8 +126,6 @@ DISTFILES += \ src/res/battery_4.png \ src/res/battery_5.png \ src/res/thumbicon.png \ - src/res/qml/backarrow.svg \ - src/res/qml/check.svg \ src/res/qml/mic_off.svg \ src/res/qml/mic_on.svg \ src/res/qml/ptt_notification.svg \ @@ -170,3 +168,5 @@ DISTFILES += \ src/res/qml/audio_page/push_to_talk/* \ src/res/qml/audio_page/profiles/* \ src/res/qml/common/* \ + +RESOURCES += src/res/resources.qrc diff --git a/src/res/qml/common/backarrow.svg b/src/res/img/common/backarrow.svg similarity index 100% rename from src/res/qml/common/backarrow.svg rename to src/res/img/common/backarrow.svg diff --git a/src/res/qml/common/check.svg b/src/res/img/common/check.svg similarity index 100% rename from src/res/qml/common/check.svg rename to src/res/img/common/check.svg diff --git a/src/res/qml/common/MyStackViewPage.qml b/src/res/qml/common/MyStackViewPage.qml index e2c8202..0690393 100644 --- a/src/res/qml/common/MyStackViewPage.qml +++ b/src/res/qml/common/MyStackViewPage.qml @@ -26,7 +26,7 @@ Rectangle { enabled: headerShowBackButton opacity: headerShowBackButton ? 1.0 : 0.0 contentItem: Image { - source: "backarrow.svg" + source: "qrc:/common/back-arrow" sourceSize.width: 50 sourceSize.height: 50 anchors.fill: parent diff --git a/src/res/qml/common/MyToggleButton.qml b/src/res/qml/common/MyToggleButton.qml index 15bc180..7c2e418 100644 --- a/src/res/qml/common/MyToggleButton.qml +++ b/src/res/qml/common/MyToggleButton.qml @@ -31,7 +31,7 @@ CheckBox { height: 28 x: (parent.width - width) / 2 y: (parent.height - height) / 2 - source: "check.svg" + source: "qrc:/common/box-checkmark" sourceSize.width: width sourceSize.height: height visible: parent.parent.checked diff --git a/src/res/resources.qrc b/src/res/resources.qrc new file mode 100644 index 0000000..b13f6f9 --- /dev/null +++ b/src/res/resources.qrc @@ -0,0 +1,6 @@ + + + img/common/backarrow.svg + img/common/check.svg + + \ No newline at end of file From a4ecb0b114d54ad6bb3334ca9c69eb021fadc7a3 Mon Sep 17 00:00:00 2001 From: Vasily Date: Sat, 2 Feb 2019 15:38:34 +0100 Subject: [PATCH 3/5] Convert images to use .qrc file, move images All images have been moved to the /img/ folder in order to fully separate qml from images. The .qrc file allows qml to use the images by appending the qrc:/ prefix before the abstract path to the image. Note that the .qrc file is also check at compile time, which further enhances the confidence the lack of errors. Some of the images are not used in the QML, but instead directly passed through to the OpenVR API. These have not been added to the .qrc file. --- advancedSettings.pro | 22 +++++++----------- src/overlaycontroller.cpp | 6 ++--- .../outline_play_pause_white_24dp.svg | 0 .../outline_skip_next_white_24dp.svg | 0 .../outline_skip_previous_white_24dp.svg | 0 .../media_keys/outline_stop_white_24dp.svg | 0 .../audio/microphone}/mic_off.svg | 0 .../audio/microphone}/mic_on.svg | 0 .../audio/microphone}/ptt_notification.png | Bin .../audio/microphone}/ptt_notification.svg | 0 .../audio/speaker}/speaker_off.svg | 0 .../audio/speaker}/speaker_on.svg | 0 src/res/{ => img/battery}/battery_0.png | Bin src/res/{ => img/battery}/battery_1.png | Bin src/res/{ => img/battery}/battery_2.png | Bin src/res/{ => img/battery}/battery_3.png | Bin src/res/{ => img/battery}/battery_4.png | Bin src/res/{ => img/battery}/battery_5.png | Bin src/res/{ => img/icons}/thumbicon.png | Bin src/res/qml/RootPage.qml | 2 +- .../device_selector/MicVolumeSlider.qml | 2 +- .../device_selector/MirrorVolumeSlider.qml | 2 +- src/res/qml/common/MyStackViewPage.qml | 2 +- src/res/qml/common/MyToggleButton.qml | 2 +- .../media_keys/MediaControllerKeys.qml | 8 +++---- src/res/resources.qrc | 18 ++++++++++++-- src/tabcontrollers/AudioTabController.cpp | 3 ++- src/tabcontrollers/UtilitiesTabController.cpp | 2 +- 28 files changed, 40 insertions(+), 29 deletions(-) rename src/res/{qml/utilities_page => img/audio}/media_keys/outline_play_pause_white_24dp.svg (100%) rename src/res/{qml/utilities_page => img/audio}/media_keys/outline_skip_next_white_24dp.svg (100%) rename src/res/{qml/utilities_page => img/audio}/media_keys/outline_skip_previous_white_24dp.svg (100%) rename src/res/{qml/utilities_page => img/audio}/media_keys/outline_stop_white_24dp.svg (100%) rename src/res/{qml/audio_page => img/audio/microphone}/mic_off.svg (100%) rename src/res/{qml/audio_page => img/audio/microphone}/mic_on.svg (100%) rename src/res/{qml => img/audio/microphone}/ptt_notification.png (100%) rename src/res/{qml => img/audio/microphone}/ptt_notification.svg (100%) rename src/res/{qml/audio_page => img/audio/speaker}/speaker_off.svg (100%) rename src/res/{qml/audio_page => img/audio/speaker}/speaker_on.svg (100%) rename src/res/{ => img/battery}/battery_0.png (100%) rename src/res/{ => img/battery}/battery_1.png (100%) rename src/res/{ => img/battery}/battery_2.png (100%) rename src/res/{ => img/battery}/battery_3.png (100%) rename src/res/{ => img/battery}/battery_4.png (100%) rename src/res/{ => img/battery}/battery_5.png (100%) rename src/res/{ => img/icons}/thumbicon.png (100%) diff --git a/advancedSettings.pro b/advancedSettings.pro index e93c00d..21ad4a9 100644 --- a/advancedSettings.pro +++ b/advancedSettings.pro @@ -118,19 +118,15 @@ unix:DESTDIR = bin/linux/AdvancedSettings DISTFILES += \ src/res/sounds/alarm01.wav \ - src/res/qml/ptt_notification.png \ - src/res/battery_0.png \ - src/res/battery_1.png \ - src/res/battery_2.png \ - src/res/battery_3.png \ - src/res/battery_4.png \ - src/res/battery_5.png \ - src/res/thumbicon.png \ - src/res/qml/mic_off.svg \ - src/res/qml/mic_on.svg \ - src/res/qml/ptt_notification.svg \ - src/res/qml/speaker_off.svg \ - src/res/qml/speaker_on.svg \ + src/res/img/audio/microphone/ptt_notification.png \ + src/res/img/audio/microphone/ptt_notification.svg \ + src/res/img/battery/battery_0.png \ + src/res/img/battery/battery_1.png \ + src/res/img/battery/battery_2.png \ + src/res/img/battery/battery_3.png \ + src/res/img/battery/battery_4.png \ + src/res/img/battery/battery_5.png \ + src/res/img/icons/thumbicon.png \ src/res/qml/qmldir \ src/res/qml/AccessibilityPage.qml \ src/res/qml/audio_page/* \ diff --git a/src/overlaycontroller.cpp b/src/overlaycontroller.cpp index 7b00181..f75fa09 100644 --- a/src/overlaycontroller.cpp +++ b/src/overlaycontroller.cpp @@ -332,9 +332,9 @@ void OverlayController::SetWidget( QQuickItem* quickItem, m_ulOverlayHandle, vr::VROverlayFlags_SendVRSmoothScrollEvents, true ); - QString thumbIconPath - = QStandardPaths::locate( QStandardPaths::AppDataLocation, - QStringLiteral( "res/thumbicon.png" ) ); + QString thumbIconPath = QStandardPaths::locate( + QStandardPaths::AppDataLocation, + QStringLiteral( "res/img/icons/thumbicon.png" ) ); if ( QFile::exists( thumbIconPath ) ) { vr::VROverlay()->SetOverlayFromFile( diff --git a/src/res/qml/utilities_page/media_keys/outline_play_pause_white_24dp.svg b/src/res/img/audio/media_keys/outline_play_pause_white_24dp.svg similarity index 100% rename from src/res/qml/utilities_page/media_keys/outline_play_pause_white_24dp.svg rename to src/res/img/audio/media_keys/outline_play_pause_white_24dp.svg diff --git a/src/res/qml/utilities_page/media_keys/outline_skip_next_white_24dp.svg b/src/res/img/audio/media_keys/outline_skip_next_white_24dp.svg similarity index 100% rename from src/res/qml/utilities_page/media_keys/outline_skip_next_white_24dp.svg rename to src/res/img/audio/media_keys/outline_skip_next_white_24dp.svg diff --git a/src/res/qml/utilities_page/media_keys/outline_skip_previous_white_24dp.svg b/src/res/img/audio/media_keys/outline_skip_previous_white_24dp.svg similarity index 100% rename from src/res/qml/utilities_page/media_keys/outline_skip_previous_white_24dp.svg rename to src/res/img/audio/media_keys/outline_skip_previous_white_24dp.svg diff --git a/src/res/qml/utilities_page/media_keys/outline_stop_white_24dp.svg b/src/res/img/audio/media_keys/outline_stop_white_24dp.svg similarity index 100% rename from src/res/qml/utilities_page/media_keys/outline_stop_white_24dp.svg rename to src/res/img/audio/media_keys/outline_stop_white_24dp.svg diff --git a/src/res/qml/audio_page/mic_off.svg b/src/res/img/audio/microphone/mic_off.svg similarity index 100% rename from src/res/qml/audio_page/mic_off.svg rename to src/res/img/audio/microphone/mic_off.svg diff --git a/src/res/qml/audio_page/mic_on.svg b/src/res/img/audio/microphone/mic_on.svg similarity index 100% rename from src/res/qml/audio_page/mic_on.svg rename to src/res/img/audio/microphone/mic_on.svg diff --git a/src/res/qml/ptt_notification.png b/src/res/img/audio/microphone/ptt_notification.png similarity index 100% rename from src/res/qml/ptt_notification.png rename to src/res/img/audio/microphone/ptt_notification.png diff --git a/src/res/qml/ptt_notification.svg b/src/res/img/audio/microphone/ptt_notification.svg similarity index 100% rename from src/res/qml/ptt_notification.svg rename to src/res/img/audio/microphone/ptt_notification.svg diff --git a/src/res/qml/audio_page/speaker_off.svg b/src/res/img/audio/speaker/speaker_off.svg similarity index 100% rename from src/res/qml/audio_page/speaker_off.svg rename to src/res/img/audio/speaker/speaker_off.svg diff --git a/src/res/qml/audio_page/speaker_on.svg b/src/res/img/audio/speaker/speaker_on.svg similarity index 100% rename from src/res/qml/audio_page/speaker_on.svg rename to src/res/img/audio/speaker/speaker_on.svg diff --git a/src/res/battery_0.png b/src/res/img/battery/battery_0.png similarity index 100% rename from src/res/battery_0.png rename to src/res/img/battery/battery_0.png diff --git a/src/res/battery_1.png b/src/res/img/battery/battery_1.png similarity index 100% rename from src/res/battery_1.png rename to src/res/img/battery/battery_1.png diff --git a/src/res/battery_2.png b/src/res/img/battery/battery_2.png similarity index 100% rename from src/res/battery_2.png rename to src/res/img/battery/battery_2.png diff --git a/src/res/battery_3.png b/src/res/img/battery/battery_3.png similarity index 100% rename from src/res/battery_3.png rename to src/res/img/battery/battery_3.png diff --git a/src/res/battery_4.png b/src/res/img/battery/battery_4.png similarity index 100% rename from src/res/battery_4.png rename to src/res/img/battery/battery_4.png diff --git a/src/res/battery_5.png b/src/res/img/battery/battery_5.png similarity index 100% rename from src/res/battery_5.png rename to src/res/img/battery/battery_5.png diff --git a/src/res/thumbicon.png b/src/res/img/icons/thumbicon.png similarity index 100% rename from src/res/thumbicon.png rename to src/res/img/icons/thumbicon.png diff --git a/src/res/qml/RootPage.qml b/src/res/qml/RootPage.qml index 257eaed..8f59a1b 100644 --- a/src/res/qml/RootPage.qml +++ b/src/res/qml/RootPage.qml @@ -344,7 +344,7 @@ MyStackViewPage { Layout.leftMargin: 12 checkable: true contentItem: Image { - source: parent.checked ? "audio_page/mic_off.svg" : "audio_page/mic_on.svg" + source: parent.checked ? "qrc:/microphone/off" : "qrc:/microphone/on" sourceSize.width: 32 sourceSize.height: 32 anchors.fill: parent diff --git a/src/res/qml/audio_page/device_selector/MicVolumeSlider.qml b/src/res/qml/audio_page/device_selector/MicVolumeSlider.qml index ce0a684..a9971a6 100644 --- a/src/res/qml/audio_page/device_selector/MicVolumeSlider.qml +++ b/src/res/qml/audio_page/device_selector/MicVolumeSlider.qml @@ -61,7 +61,7 @@ ColumnLayout { Layout.leftMargin: 12 checkable: true contentItem: Image { - source: parent.checked ? "../mic_off.svg" : "../mic_on.svg" + source: parent.checked ? "qrc:/microphone/off" : "qrc:/microphone/on" sourceSize.width: 32 sourceSize.height: 32 anchors.fill: parent diff --git a/src/res/qml/audio_page/device_selector/MirrorVolumeSlider.qml b/src/res/qml/audio_page/device_selector/MirrorVolumeSlider.qml index 7add052..b90199a 100644 --- a/src/res/qml/audio_page/device_selector/MirrorVolumeSlider.qml +++ b/src/res/qml/audio_page/device_selector/MirrorVolumeSlider.qml @@ -62,7 +62,7 @@ ColumnLayout { Layout.leftMargin: 12 checkable: true contentItem: Image { - source: parent.checked ? "../speaker_off.svg" : "../speaker_on.svg" + source: parent.checked ? "qrc:/speaker/off" : "qrc:/speaker/on" sourceSize.width: 32 sourceSize.height: 32 anchors.fill: parent diff --git a/src/res/qml/common/MyStackViewPage.qml b/src/res/qml/common/MyStackViewPage.qml index 0690393..02a741a 100644 --- a/src/res/qml/common/MyStackViewPage.qml +++ b/src/res/qml/common/MyStackViewPage.qml @@ -26,7 +26,7 @@ Rectangle { enabled: headerShowBackButton opacity: headerShowBackButton ? 1.0 : 0.0 contentItem: Image { - source: "qrc:/common/back-arrow" + source: "qrc:/common/backarrow" sourceSize.width: 50 sourceSize.height: 50 anchors.fill: parent diff --git a/src/res/qml/common/MyToggleButton.qml b/src/res/qml/common/MyToggleButton.qml index 7c2e418..99126d5 100644 --- a/src/res/qml/common/MyToggleButton.qml +++ b/src/res/qml/common/MyToggleButton.qml @@ -31,7 +31,7 @@ CheckBox { height: 28 x: (parent.width - width) / 2 y: (parent.height - height) / 2 - source: "qrc:/common/box-checkmark" + source: "qrc:/common/box_checkmark" sourceSize.width: width sourceSize.height: height visible: parent.parent.checked diff --git a/src/res/qml/utilities_page/media_keys/MediaControllerKeys.qml b/src/res/qml/utilities_page/media_keys/MediaControllerKeys.qml index a22c4ae..14b6ffc 100644 --- a/src/res/qml/utilities_page/media_keys/MediaControllerKeys.qml +++ b/src/res/qml/utilities_page/media_keys/MediaControllerKeys.qml @@ -25,10 +25,10 @@ GroupBox { } RowLayout { - property string playPauseButtonPath: "outline_play_pause_white_24dp.svg" - property string stopButtonPath: "outline_stop_white_24dp.svg" - property string previousButtonPath: "outline_skip_previous_white_24dp.svg" - property string nextButtonPath: "outline_skip_next_white_24dp.svg" + property string playPauseButtonPath: "qrc:/media_keys/play_pause" + property string stopButtonPath: "qrc:/media_keys/stop" + property string previousButtonPath: "qrc:/media_keys/previous" + property string nextButtonPath: "qrc:/media_keys/next" MediaButton { id: previousSongButton diff --git a/src/res/resources.qrc b/src/res/resources.qrc index b13f6f9..6fb7946 100644 --- a/src/res/resources.qrc +++ b/src/res/resources.qrc @@ -1,6 +1,20 @@ - img/common/backarrow.svg - img/common/check.svg + img/common/backarrow.svg + img/common/check.svg + + + img/audio/microphone/mic_on.svg + img/audio/microphone/mic_off.svg + + + img/audio/speaker/speaker_on.svg + img/audio/speaker/speaker_off.svg + + + img/audio/media_keys/outline_play_pause_white_24dp.svg + img/audio/media_keys/outline_skip_next_white_24dp.svg + img/audio/media_keys/outline_skip_previous_white_24dp.svg + img/audio/media_keys/outline_stop_white_24dp.svg \ No newline at end of file diff --git a/src/tabcontrollers/AudioTabController.cpp b/src/tabcontrollers/AudioTabController.cpp index 6e30b62..9dcfedf 100644 --- a/src/tabcontrollers/AudioTabController.cpp +++ b/src/tabcontrollers/AudioTabController.cpp @@ -72,7 +72,8 @@ void AudioTabController::initStage2( OverlayController* var_parent, { QString notifIconPath = QStandardPaths::locate( QStandardPaths::AppDataLocation, - QStringLiteral( "/res/qml/ptt_notification.png" ) ); + QStringLiteral( + "/res/img/audio/microphone/ptt_notification.png" ) ); if ( QFile::exists( notifIconPath ) ) { vr::VROverlay()->SetOverlayFromFile( diff --git a/src/tabcontrollers/UtilitiesTabController.cpp b/src/tabcontrollers/UtilitiesTabController.cpp index 0296873..f4effb0 100644 --- a/src/tabcontrollers/UtilitiesTabController.cpp +++ b/src/tabcontrollers/UtilitiesTabController.cpp @@ -274,7 +274,7 @@ void UtilitiesTabController::modAlarmTimeMinute( int value, bool notify ) QString getBatteryIconPath( int batteryState ) { - QString batteryPrefix = "/res/battery_"; + QString batteryPrefix = "/res/img/battery/battery_"; return QStandardPaths::locate( QStandardPaths::AppDataLocation, batteryPrefix + QString::number( batteryState ) + ".png" ); From c662334a1790ffcf144d8c8ee7bae83feac511a6 Mon Sep 17 00:00:00 2001 From: Vasily Date: Sat, 2 Feb 2019 16:06:03 +0100 Subject: [PATCH 4/5] Remove unneeded imports from .pro file --- advancedSettings.pro | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/advancedSettings.pro b/advancedSettings.pro index 21ad4a9..8296354 100644 --- a/advancedSettings.pro +++ b/advancedSettings.pro @@ -120,31 +120,14 @@ DISTFILES += \ src/res/sounds/alarm01.wav \ src/res/img/audio/microphone/ptt_notification.png \ src/res/img/audio/microphone/ptt_notification.svg \ - src/res/img/battery/battery_0.png \ - src/res/img/battery/battery_1.png \ - src/res/img/battery/battery_2.png \ - src/res/img/battery/battery_3.png \ - src/res/img/battery/battery_4.png \ - src/res/img/battery/battery_5.png \ - src/res/img/icons/thumbicon.png \ + src/res/img/battery/* \ + src/res/img/icons/* \ src/res/qml/qmldir \ src/res/qml/AccessibilityPage.qml \ src/res/qml/audio_page/* \ src/res/qml/ChaperonePage.qml \ src/res/qml/ChaperoneWarningsPage.qml \ src/res/qml/FixFloorPage.qml \ - src/res/qml/mainwidget.qml \ - src/res/qml/MyComboBox.qml \ - src/res/qml/MyDialogOkCancelPopup.qml \ - src/res/qml/MyDialogOkPopup.qml \ - src/res/qml/MyPushButton.qml \ - src/res/qml/MyPushButton2.qml \ - src/res/qml/MyResources.qml \ - src/res/qml/MySlider.qml \ - src/res/qml/MyStackViewPage.qml \ - src/res/qml/MyText.qml \ - src/res/qml/MyTextField.qml \ - src/res/qml/MyToggleButton.qml \ src/res/qml/PlayspacePage.qml \ src/res/qml/PttControllerConfigDialog.qml \ src/res/qml/RevivePage.qml \ @@ -154,7 +137,6 @@ DISTFILES += \ src/res/qml/SteamVRPage.qml \ src/res/qml/utilities_page/* \ src/res/qml/utilities_page/media_keys/* \ - src/res/qml/LineSeparator.qml \ src/res/qml/utilities_page/keyboard_utils/* \ src/res/qml/utilities_page/desktop_size/* \ src/res/qml/utilities_page/alarm_clock/* \ From 2f07a987bfd7db34546e32ca0137e2ca7797d32c Mon Sep 17 00:00:00 2001 From: Vasily Date: Sat, 2 Feb 2019 16:34:08 +0100 Subject: [PATCH 5/5] Add .gitattributes file .svg files were not treated as binary which means they were spamming up the diff log. Bash files were not being pulled with LF line endings, which means they couldn't be run by Windows Subsystem for Linux. Bash files were renamed .sh to easily allow them to be recognized by both .gitattributes and humans. Taken from https://github.com/alexkaratarakis/gitattributes. --- .gitattributes | 95 +++++++++++++++++++ build_scripts/linux/{format => format.sh} | 0 ...verify_formatting => verify_formatting.sh} | 0 3 files changed, 95 insertions(+) create mode 100644 .gitattributes rename build_scripts/linux/{format => format.sh} (100%) mode change 100755 => 100644 rename build_scripts/linux/{verify_formatting => verify_formatting.sh} (100%) mode change 100755 => 100644 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..2c1b613 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,95 @@ +# Common settings that generally should always be used with your language specific settings + +# Auto detect text files and perform LF normalization +# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ +* text=auto + +# +# The above will handle all files NOT found below +# + +# Documents +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain +*.md text +*.tex text +*.adoc text +*.textile text +*.mustache text +*.csv text +*.tab text +*.tsv text +*.sql text + +# Graphics +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.tif binary +*.tiff binary +*.ico binary +# SVG treated as an asset (binary) by default. If you want to treat it as text, +# comment-out the following line and uncomment the line after. +*.svg binary +#*.svg text +*.eps binary + +# +# Exclude files from exporting +# + +.gitattributes export-ignore +.gitignore export-ignore + +#sources +*.c text diff=cpp +*.cc text diff=cpp +*.cxx text diff=cpp +*.cpp text diff=cpp +*.c++ text diff=cpp +*.hpp text diff=cpp +*.h text diff=cpp +*.h++ text diff=cpp +*.hh text diff=cpp + +# Compiled Object files +*.slo binary +*.lo binary +*.o binary +*.obj binary + +# Precompiled Headers +*.gch binary +*.pch binary + +# Compiled Dynamic libraries +*.so binary +*.dylib binary +*.dll binary + +# Compiled Static libraries +*.lai binary +*.la binary +*.a binary +*.lib binary + +# Executables +*.exe binary +*.out binary +*.app binary + +#Qt Specific +*.qml text + +#Linux Shell Scripts +#Windows Subsystem for Linux will not run CLRF files. +*.sh text eof=lf diff --git a/build_scripts/linux/format b/build_scripts/linux/format.sh old mode 100755 new mode 100644 similarity index 100% rename from build_scripts/linux/format rename to build_scripts/linux/format.sh diff --git a/build_scripts/linux/verify_formatting b/build_scripts/linux/verify_formatting.sh old mode 100755 new mode 100644 similarity index 100% rename from build_scripts/linux/verify_formatting rename to build_scripts/linux/verify_formatting.sh