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.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
|
||||
|
||||
Item {
|
||||
|
|
|
@ -2,8 +2,6 @@ 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
|
||||
|
||||
Dialog {
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.3
|
||||
import Qt.labs.settings 1.0
|
||||
import player 1.0
|
||||
|
||||
Action {
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.3
|
||||
import Qt.labs.settings 1.0
|
||||
import player 1.0
|
||||
|
||||
Rectangle {
|
||||
id: chapterMarker
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.3
|
||||
import Qt.labs.settings 1.0
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
Process {
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.3
|
||||
import Qt.labs.settings 1.0
|
||||
import player 1.0
|
||||
|
||||
Action {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
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
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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 {
|
||||
iconSource: "icons/" + appearance.themeName + "/fullscreen.svg"
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
onClicked: {
|
||||
toggleFullscreen()
|
||||
}
|
||||
|
|
|
@ -1,7 +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
|
||||
|
||||
Item {
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
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 {
|
||||
|
|
|
@ -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
|
||||
|
||||
SmoothButton {
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
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 {
|
||||
|
|
|
@ -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
|
||||
|
||||
SmoothButton {
|
||||
id: settingsButton
|
||||
iconSource: "icons/" + appearance.themeName + "/settings.svg"
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
onClicked: {
|
||||
var aptn = appearance.themeName
|
||||
appearance.themeName = aptn == "YouTube" ? "RoosterTeeth" : aptn
|
||||
== "RoosterTeeth" ? "Niconico" : "YouTube"
|
||||
switch(appearance.themeName) {
|
||||
case "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.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 QtQuick 2.0
|
||||
|
||||
Control {
|
||||
id: root
|
||||
hoverEnabled: true
|
||||
|
|
|
@ -1,10 +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
|
||||
|
||||
Text {
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
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
|
||||
|
||||
Text {
|
||||
id: timeLabel
|
||||
objectName: "timeLabel"
|
||||
text: "0:00 / 0:00"
|
||||
color: "white"
|
||||
font.family: appearance.fontName
|
||||
|
|
|
@ -1,10 +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
|
||||
|
||||
Rectangle {
|
||||
|
|
|
@ -1,10 +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
|
||||
|
||||
Slider {
|
||||
|
@ -40,7 +35,7 @@ Slider {
|
|||
onPlayStatusChanged: function (status) {
|
||||
if (status == Enums.PlayStatus.Playing) {
|
||||
progressBar.playing = true
|
||||
} else if (status == status == Enums.PlayStatus.Paused) {
|
||||
} else if (status == Enums.PlayStatus.Paused) {
|
||||
progressBar.playing = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
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 {
|
||||
|
|
|
@ -1,11 +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
|
||||
|
||||
Slider {
|
||||
id: volumeBar
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import QtQuick 2.0
|
||||
import Qt.labs.settings 1.0
|
||||
|
||||
import "translations.js" as Translations
|
||||
|
||||
Item {
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
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 "codes.js" as LanguageCodes
|
||||
|
||||
Window {
|
||||
id: mainWindow
|
||||
title: "KittehPlayer"
|
||||
|
@ -30,15 +25,16 @@ Window {
|
|||
}
|
||||
|
||||
function getAppearanceValueForTheme(themeName, name) {
|
||||
if (themeName == "YouTube") {
|
||||
return youTubeAppearance[name]
|
||||
} else if (themeName == "Niconico") {
|
||||
return nicoNicoAppearance[name]
|
||||
} else if (themeName == "RoosterTeeth") {
|
||||
return roosterTeethAppearance[name]
|
||||
} else {
|
||||
appearance.themeName = "YouTube"
|
||||
return youTubeAppearance[name]
|
||||
switch(themeName) {
|
||||
case"YouTube":
|
||||
return youTubeAppearance[name]
|
||||
case "Niconico":
|
||||
return nicoNicoAppearance[name]
|
||||
case "RoosterTeeth":
|
||||
return roosterTeethAppearance[name]
|
||||
default:
|
||||
appearance.themeName = "YouTube"
|
||||
return youTubeAppearance[name]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue