Remove unneeded imports, making compile 1.1x faster and making startup 2.7x faster
This commit is contained in:
parent
f5679cc66e
commit
290be3df35
|
@ -1,10 +1,6 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
@ -2,8 +2,6 @@ import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Dialogs 1.3
|
import QtQuick.Dialogs 1.3
|
||||||
import QtQuick.Window 2.2
|
import QtQuick.Window 2.2
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
Dialog {
|
Dialog {
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
import QtQuick 2.0
|
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import player 1.0
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: chapterMarker
|
id: chapterMarker
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
|
|
||||||
MenuItem {
|
MenuItem {
|
||||||
id: menuItem
|
id: menuItem
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
import QtQuick 2.0
|
|
||||||
import QtQuick.Controls 2.3
|
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
import QtQuick 2.0
|
|
||||||
import QtQuick.Controls 2.3
|
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
import QtQuick 2.0
|
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Dialogs 1.3
|
import QtQuick.Dialogs 1.3
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
import Qt.labs.platform 1.0 as LabsPlatform
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
import QtQuick 2.0
|
|
||||||
import QtQuick.Controls 2.3
|
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
SmoothButton {
|
SmoothButton {
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
import QtQuick 2.0
|
|
||||||
import QtQuick.Controls 2.3
|
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
SmoothButton {
|
SmoothButton {
|
||||||
|
|
|
@ -1,15 +1,5 @@
|
||||||
import QtQuick 2.0
|
|
||||||
import QtQuick.Controls 2.3
|
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
|
||||||
|
|
||||||
SmoothButton {
|
SmoothButton {
|
||||||
iconSource: "icons/" + appearance.themeName + "/fullscreen.svg"
|
iconSource: "icons/" + appearance.themeName + "/fullscreen.svg"
|
||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
toggleFullscreen()
|
toggleFullscreen()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
|
||||||
import QtQuick.Window 2.2
|
import QtQuick.Window 2.2
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
SmoothButton {
|
SmoothButton {
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
import QtQuick 2.0
|
|
||||||
import QtQuick.Controls 2.3
|
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
SmoothButton {
|
SmoothButton {
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
SmoothButton {
|
SmoothButton {
|
||||||
|
|
|
@ -1,19 +1,21 @@
|
||||||
import QtQuick 2.0
|
|
||||||
import QtQuick.Controls 2.3
|
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
SmoothButton {
|
SmoothButton {
|
||||||
id: settingsButton
|
id: settingsButton
|
||||||
iconSource: "icons/" + appearance.themeName + "/settings.svg"
|
iconSource: "icons/" + appearance.themeName + "/settings.svg"
|
||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var aptn = appearance.themeName
|
switch(appearance.themeName) {
|
||||||
appearance.themeName = aptn == "YouTube" ? "RoosterTeeth" : aptn
|
case "YouTube":
|
||||||
== "RoosterTeeth" ? "Niconico" : "YouTube"
|
appearance.themeName = "RoosterTeeth"
|
||||||
|
break
|
||||||
|
case "RoosterTeeth":
|
||||||
|
appearance.themeName = "Niconico"
|
||||||
|
break
|
||||||
|
case "Niconico":
|
||||||
|
appearance.themeName = "YouTube"
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
appearance.themeName = "YouTube"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
|
|
||||||
import QtQuick 2.0
|
|
||||||
|
|
||||||
Control {
|
Control {
|
||||||
id: root
|
id: root
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
|
|
@ -1,15 +1,8 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: timeLabel
|
id: timeLabel
|
||||||
objectName: "timeLabel"
|
|
||||||
text: "0:00 / 0:00"
|
text: "0:00 / 0:00"
|
||||||
color: "white"
|
color: "white"
|
||||||
font.family: appearance.fontName
|
font.family: appearance.fontName
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
Slider {
|
Slider {
|
||||||
|
@ -40,7 +35,7 @@ Slider {
|
||||||
onPlayStatusChanged: function (status) {
|
onPlayStatusChanged: function (status) {
|
||||||
if (status == Enums.PlayStatus.Playing) {
|
if (status == Enums.PlayStatus.Playing) {
|
||||||
progressBar.playing = true
|
progressBar.playing = true
|
||||||
} else if (status == status == Enums.PlayStatus.Paused) {
|
} else if (status == Enums.PlayStatus.Paused) {
|
||||||
progressBar.playing = false
|
progressBar.playing = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
SmoothButton {
|
SmoothButton {
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
|
||||||
import QtQuick.Window 2.2
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
|
||||||
|
|
||||||
Slider {
|
Slider {
|
||||||
id: volumeBar
|
id: volumeBar
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
|
|
||||||
import "translations.js" as Translations
|
import "translations.js" as Translations
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
@ -1,14 +1,9 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
import QtQuick.Layouts 1.2
|
|
||||||
import QtQuick.Window 2.2
|
import QtQuick.Window 2.2
|
||||||
import Qt.labs.settings 1.0
|
import Qt.labs.settings 1.0
|
||||||
import Qt.labs.platform 1.0 as LabsPlatform
|
|
||||||
import player 1.0
|
import player 1.0
|
||||||
|
|
||||||
import "codes.js" as LanguageCodes
|
|
||||||
|
|
||||||
Window {
|
Window {
|
||||||
id: mainWindow
|
id: mainWindow
|
||||||
title: "KittehPlayer"
|
title: "KittehPlayer"
|
||||||
|
@ -30,13 +25,14 @@ Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAppearanceValueForTheme(themeName, name) {
|
function getAppearanceValueForTheme(themeName, name) {
|
||||||
if (themeName == "YouTube") {
|
switch(themeName) {
|
||||||
|
case"YouTube":
|
||||||
return youTubeAppearance[name]
|
return youTubeAppearance[name]
|
||||||
} else if (themeName == "Niconico") {
|
case "Niconico":
|
||||||
return nicoNicoAppearance[name]
|
return nicoNicoAppearance[name]
|
||||||
} else if (themeName == "RoosterTeeth") {
|
case "RoosterTeeth":
|
||||||
return roosterTeethAppearance[name]
|
return roosterTeethAppearance[name]
|
||||||
} else {
|
default:
|
||||||
appearance.themeName = "YouTube"
|
appearance.themeName = "YouTube"
|
||||||
return youTubeAppearance[name]
|
return youTubeAppearance[name]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue