mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-21 18:50:47 +03:00
Fix some qml compiler stuff and add verbose compilation output
This commit is contained in:
parent
634a247b4c
commit
5791c48370
16 changed files with 71 additions and 75 deletions
|
@ -775,7 +775,7 @@ set(QML_SOURCES
|
|||
resources/qml/dialogs/RoomDirectory.qml
|
||||
resources/qml/dialogs/RoomMembers.qml
|
||||
resources/qml/dialogs/AllowedRoomsSettingsDialog.qml
|
||||
resources/qml/dialogs/RoomSettings.qml
|
||||
resources/qml/dialogs/RoomSettingsDialog.qml
|
||||
resources/qml/dialogs/UserProfile.qml
|
||||
resources/qml/dialogs/IgnoredUsers.qml
|
||||
resources/qml/emoji/StickerPicker.qml
|
||||
|
@ -805,7 +805,7 @@ qt_add_qml_module(nheko
|
|||
NO_RESOURCE_TARGET_PATH
|
||||
RESOURCE_PREFIX "/"
|
||||
VERSION 1.1
|
||||
DEPENDENCIES QtQml QtQuick # https://bugreports.qt.io/browse/QTBUG-102554
|
||||
DEPENDENCIES QtQuick QtQml.Models
|
||||
QML_FILES
|
||||
${QML_SOURCES}
|
||||
SOURCES
|
||||
|
@ -816,6 +816,10 @@ qt_add_qml_module(nheko
|
|||
# #PREFIX "/"
|
||||
#)
|
||||
|
||||
set_target_properties(nheko PROPERTIES
|
||||
QT_QMLCACHEGEN_ARGUMENTS "--verbose"
|
||||
)
|
||||
|
||||
#
|
||||
# Bundle translations
|
||||
#
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.1
|
||||
import QtQuick.Window 2.15
|
||||
import im.nheko 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Window
|
||||
import im.nheko
|
||||
|
||||
Image {
|
||||
id: stateImg
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
pragma ComponentBehavior: Bound
|
||||
import "./ui"
|
||||
import QtQuick 2.3
|
||||
import QtQuick.Controls 2.3
|
||||
import im.nheko 1.0 // for cursor shape
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import im.nheko // for cursor shape
|
||||
|
||||
AbstractButton {
|
||||
id: button
|
||||
|
|
|
@ -245,7 +245,7 @@ Pane {
|
|||
}
|
||||
}
|
||||
function onOpenRoomSettingsDialog(settings) {
|
||||
var component = Qt.createComponent("qrc:/resources/qml/dialogs/RoomSettings.qml");
|
||||
var component = Qt.createComponent("qrc:/resources/qml/dialogs/RoomSettingsDialog.qml");
|
||||
if (component.status == Component.Ready) {
|
||||
var roomSettings = component.createObject(timelineRoot, {
|
||||
"roomSettings": settings
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import ".."
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
@ -38,7 +37,7 @@ Control {
|
|||
Label {
|
||||
id: encryptedText
|
||||
text: {
|
||||
switch (encryptionError) {
|
||||
switch (r.encryptionError) {
|
||||
case Olm.MissingSession:
|
||||
return qsTr("There is no key to unlock this message. We requested the key automatically, but you can try requesting it again if you are impatient.");
|
||||
case Olm.MissingSessionIndex:
|
||||
|
@ -63,7 +62,7 @@ Control {
|
|||
}
|
||||
|
||||
Button {
|
||||
visible: encryptionError == Olm.MissingSession || encryptionError == Olm.MissingSessionIndex
|
||||
visible: r.encryptionError == Olm.MissingSession || encryptionError == Olm.MissingSessionIndex
|
||||
text: qsTr("Request key")
|
||||
onClicked: room.requestKeyForEvent(eventId)
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@ Control {
|
|||
|
||||
color: palette.light
|
||||
radius: 22
|
||||
height: 44
|
||||
width: 44
|
||||
Layout.preferredHeight: 44
|
||||
Layout.preferredWidth: 44
|
||||
|
||||
Image {
|
||||
id: img
|
||||
|
@ -54,7 +54,7 @@ Control {
|
|||
}
|
||||
|
||||
NhekoCursorShape {
|
||||
anchors.fill: parent
|
||||
anchors.fill: evRoot.parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ Control {
|
|||
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: implicitWidth + 1
|
||||
text: filename
|
||||
text: evRoot.filename
|
||||
textFormat: Text.PlainText
|
||||
elide: Text.ElideRight
|
||||
color: palette.text
|
||||
|
@ -79,7 +79,7 @@ Control {
|
|||
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: implicitWidth + 1
|
||||
text: filesize
|
||||
text: evRoot.filesize
|
||||
textFormat: Text.PlainText
|
||||
elide: Text.ElideRight
|
||||
color: palette.text
|
||||
|
|
|
@ -34,38 +34,36 @@ AbstractButton {
|
|||
name: "BlurhashVisible"
|
||||
|
||||
PropertyChanges {
|
||||
target: blurhash_
|
||||
blurhash_ {
|
||||
opacity: (img.status != Image.Ready) || (timeline.privacyScreen.active && blurhash) ? 1 : 0
|
||||
visible: (img.status != Image.Ready) || (timeline.privacyScreen.active && blurhash)
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: img
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: mxcimage
|
||||
opacity: 0
|
||||
img.opacity: 0
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
mxcimage.opacity: 0
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "ImageVisible"
|
||||
|
||||
PropertyChanges {
|
||||
target: blurhash_
|
||||
blurhash_ {
|
||||
opacity: 0
|
||||
visible: false
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: img
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: mxcimage
|
||||
opacity: 1
|
||||
img.opacity: 1
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
mxcimage.opacity: 1
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -2,12 +2,10 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import "../"
|
||||
import "../ui/media"
|
||||
import QtMultimedia
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import im.nheko
|
||||
|
||||
Item {
|
||||
|
@ -47,7 +45,7 @@ Item {
|
|||
Rectangle {
|
||||
id: videoContainer
|
||||
|
||||
color: type == MtxEvent.VideoMessage ? palette.window : "transparent"
|
||||
color: content.type == MtxEvent.VideoMessage ? palette.window : "transparent"
|
||||
width: parent.width
|
||||
height: parent.height - fileInfoLabel.height
|
||||
|
||||
|
@ -57,14 +55,14 @@ Item {
|
|||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: thumbnailUrl ? thumbnailUrl.replace("mxc://", "image://MxcImage/") + "?scale" : "image://colorimage/:/icons/icons/ui/video-file.svg?" + palette.windowText
|
||||
source: content.thumbnailUrl ? thumbnailUrl.replace("mxc://", "image://MxcImage/") + "?scale" : "image://colorimage/:/icons/icons/ui/video-file.svg?" + palette.windowText
|
||||
asynchronous: true
|
||||
fillMode: Image.PreserveAspectFit
|
||||
|
||||
VideoOutput {
|
||||
id: videoOutput
|
||||
|
||||
visible: type == MtxEvent.VideoMessage
|
||||
visible: content.type == MtxEvent.VideoMessage
|
||||
clip: true
|
||||
anchors.fill: parent
|
||||
fillMode: VideoOutput.PreserveAspectFit
|
||||
|
@ -79,7 +77,7 @@ Item {
|
|||
anchors.left: videoContainer.left
|
||||
anchors.right: videoContainer.right
|
||||
anchors.bottom: videoContainer.bottom
|
||||
playingVideo: type == MtxEvent.VideoMessage
|
||||
playingVideo: content.type == MtxEvent.VideoMessage
|
||||
positionValue: mxcmedia.position
|
||||
duration: mediaLoaded ? mxcmedia.duration : content.duration
|
||||
mediaLoaded: mxcmedia.loaded
|
||||
|
@ -95,7 +93,7 @@ Item {
|
|||
id: fileInfoLabel
|
||||
|
||||
anchors.top: videoContainer.bottom
|
||||
text: body + " [" + filesize + "]"
|
||||
text: content.body + " [" + filesize + "]"
|
||||
textFormat: Text.RichText
|
||||
elide: Text.ElideRight
|
||||
color: palette.text
|
||||
|
|
|
@ -33,7 +33,7 @@ Control {
|
|||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
Layout.maximumWidth: implicitWidth + 1
|
||||
Layout.fillWidth: true
|
||||
property var redactedPair: room.formatRedactedEvent(msgRoot.eventId)
|
||||
property var redactedPair: msgRoot.room.formatRedactedEvent(msgRoot.eventId)
|
||||
text: redactedPair["first"]
|
||||
wrapMode: Label.WordWrap
|
||||
|
||||
|
|
|
@ -2,12 +2,10 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import Qt.labs.platform 1.1 as Platform
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtQuick.Window 2.13
|
||||
import im.nheko 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Window
|
||||
import im.nheko
|
||||
import "../"
|
||||
|
||||
AbstractButton {
|
||||
|
@ -45,7 +43,7 @@ AbstractButton {
|
|||
id: timelineEvent
|
||||
|
||||
isStateEvent: false
|
||||
room: room_
|
||||
room: r.room_
|
||||
eventId: r.eventId
|
||||
replyTo: ""
|
||||
mainInset: 4 + Nheko.paddingMedium
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import ".."
|
||||
import QtQuick.Controls
|
||||
import im.nheko
|
||||
|
||||
MatrixText {
|
||||
|
@ -18,28 +17,28 @@ MatrixText {
|
|||
property bool fitsMetadata: false //positionAt(width,height-4) == positionAt(width-metadataWidth-10, height-4)
|
||||
|
||||
// table border-collapse doesn't seem to work
|
||||
text: "
|
||||
<style type=\"text/css\">
|
||||
code { background-color: " + palette.alternateBase + "; white-space: pre-wrap; }
|
||||
pre { background-color: " + palette.alternateBase + "; white-space: pre-wrap; }
|
||||
text: `
|
||||
<style type="text/css">
|
||||
code { background-color: ` + palette.alternateBase + `; white-space: pre-wrap; }
|
||||
pre { background-color: ` + palette.alternateBase + `; white-space: pre-wrap; }
|
||||
table {
|
||||
border-width: 1px;
|
||||
border-collapse: collapse;
|
||||
border-style: solid;
|
||||
border-color: " + palette.text + ";
|
||||
background-color: " + palette.alternateBase + ";
|
||||
border-color: ` + palette.text + `;
|
||||
background-color: ` + palette.alternateBase + `;
|
||||
}
|
||||
table th,
|
||||
table td {
|
||||
padding: " + Math.ceil(fontMetrics.lineSpacing/2) + "px;
|
||||
padding: ` + Math.ceil(fontMetrics.lineSpacing/2) + `px;
|
||||
}
|
||||
blockquote { margin-left: 1em; }
|
||||
" + (!Settings.mobileMode ? "span[data-mx-spoiler] {
|
||||
` + (!Settings.mobileMode ? `span[data-mx-spoiler] {
|
||||
color: transparent;
|
||||
background-color: " + palette.text + ";
|
||||
}" : "") + // TODO(Nico): Figure out how to support mobile
|
||||
"</style>
|
||||
" + formatted.replace(/<del>/g, "<s>").replace(/<\/del>/g, "</s>").replace(/<strike>/g, "<s>").replace(/<\/strike>/g, "</s>")
|
||||
background-color: ` + palette.text + `;
|
||||
}` : "") + // TODO(Nico): Figure out how to support mobile
|
||||
`</style>
|
||||
` + formatted.replace(/<del>/g, "<s>").replace(/<\/del>/g, "</s>").replace(/<strike>/g, "<s>").replace(/<\/strike>/g, "</s>")
|
||||
|
||||
enabled: !isReply
|
||||
font.pointSize: (Settings.enlargeEmojiOnlyMessages && isOnlyEmoji > 0 && isOnlyEmoji < 4) ? Settings.fontSize * 3 : Settings.fontSize
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import QtQml 2.15
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 2.15
|
||||
import QtQuick.Window 2.15
|
||||
import im.nheko 1.0
|
||||
import QtQml
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Window
|
||||
import im.nheko
|
||||
import "../"
|
||||
|
||||
Window {
|
||||
id: ignoredUsers
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import "../"
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.2
|
||||
import im.nheko 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import im.nheko
|
||||
|
||||
Rectangle {
|
||||
visible: CallManager.haveCallInvite && !Settings.mobileMode
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import "../"
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.2
|
||||
import im.nheko 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import im.nheko
|
||||
|
||||
Popup {
|
||||
modal: true
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import QtQuick 2.9
|
||||
import org.freedesktop.gstreamer.GLVideoItem 1.0
|
||||
|
||||
GstGLVideoItem {
|
||||
|
|
Loading…
Reference in a new issue