Skip to content

Commit

Permalink
Start move to qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
neochapay committed Oct 13, 2023
1 parent d9e0df1 commit abee075
Show file tree
Hide file tree
Showing 14 changed files with 52 additions and 128 deletions.
19 changes: 6 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
cmake_minimum_required(VERSION 3.6.0)

project(glacier-messages
VERSION 0.1.2
VERSION 0.3
DESCRIPTION "The Glacier messages")

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_INSTALL_PREFIX /usr)

include(FeatureSummary)
include(GNUInstallDirs)

set(QT_MIN_VERSION "5.12.0")
find_package(Qt5 COMPONENTS Gui Qml Quick DBus LinguistTools REQUIRED)
find_package(Glacier 0.8 COMPONENTS App REQUIRED)
find_package(Qt5QuickCompiler)
set(QT_MIN_VERSION "6.0.0")
find_package(Qt6 COMPONENTS Gui Qml Quick DBus LinguistTools REQUIRED)
find_package(Glacier 1.0 COMPONENTS App REQUIRED)

add_subdirectory(src)

# Translations
file(GLOB TS_FILES translations/*.ts)
qt5_add_translation(QM_FILES ${TS_FILES})
qt6_add_translation(QM_FILES ${TS_FILES})
add_custom_target(translations DEPENDS ${QM_FILES})
add_dependencies(glacier-messages translations)

Expand All @@ -40,16 +40,9 @@ install(FILES ${SVG_FILES}
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glacier-messages/images)

install(FILES
data/org.freedesktop.Telepathy.Client.qmlmessages.service
data/org.nemomobile.qmlmessages.service
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/services)

install(FILES
data/glacier-messages.service
DESTINATION ${CMAKE_INSTALL_LIBDIR}/systemd/user/)


install(FILES
data/glacier-messages.client
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/telepathy/clients)

17 changes: 0 additions & 17 deletions data/glacier-messages.client

This file was deleted.

4 changes: 2 additions & 2 deletions data/glacier-messages.service
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Unit]
Description=Glacier messaging application
Requires=dbus.socket mission-control-5.service lipstick.service
After=dbus.socket mission-control-5.service lipstick.service
Requires=dbus.socket lipstick.service
After=dbus.socket lipstick.service

[Service]
Type=dbus
Expand Down
4 changes: 0 additions & 4 deletions data/org.freedesktop.Telepathy.Client.qmlmessages.service

This file was deleted.

10 changes: 5 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ set(SRC
main.cpp
)

qtquick_compiler_add_resources(RESOURCES qml/glacier-messages.qrc)
qt_add_resources(RESOURCES qml/glacier-messages.qrc)

add_executable(glacier-messages ${SRC} ${RESOURCES})

target_link_libraries(glacier-messages
Qt5::Gui
Qt5::Qml
Qt5::Quick
Qt5::DBus
Qt6::Gui
Qt6::Qml
Qt6::Quick
Qt6::DBus
Glacier::App)

install(TARGETS glacier-messages RUNTIME
Expand Down
14 changes: 6 additions & 8 deletions src/qml/components/ChatTextInput.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

import QtQuick 2.6
import QtQuick
import QtQuick.Controls

import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0

import QtQuick.Controls.Styles 1.4
import Nemo
import Nemo.Controls

Item {
id: textArea
Expand Down Expand Up @@ -86,14 +84,14 @@ Item {
visible: (!textInput.focus && !inputFocusScope.focus) || textInput.text.lenght == 0
}

style: TextAreaStyle {
/*style: TextAreaStyle {
backgroundColor: Theme.fillDarkColor
font.pixelSize: Theme.fontSizeMedium
font.family: Theme.fontFamily
textColor: Theme.textColor
selectedTextColor: Theme.textColor
selectionColor: Theme.accentColor
}
}*/
}
}

Expand Down
10 changes: 4 additions & 6 deletions src/qml/components/ConversationListDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

import QtQuick 2.6
import QtQuick
import QtQuick.Controls

import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0

import org.nemomobile.qmlcontacts 1.0
import Nemo
import Nemo.Controls

ListViewItemWithActions {
id: converstationListDelegate
Expand Down
13 changes: 5 additions & 8 deletions src/qml/components/ConversationListWidget.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import QtQuick
import QtQuick.Controls

import QtQuick 2.6

import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0

import org.nemomobile.messages.internal 1.0
import Nemo
import Nemo.Controls

Item {
Label{
Expand All @@ -53,7 +50,7 @@ Item {
focus: true
keyNavigationWraps: false
clip: true
model: groupModel
// model: groupModel

delegate: ConversationListDelegate {
onClicked: {
Expand Down
4 changes: 2 additions & 2 deletions src/qml/components/MessagesService.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import QtQuick 2.6
import Nemo.DBus 2.0
import QtQuick
import Nemo.DBus

Item {
id: rootObject
Expand Down
11 changes: 4 additions & 7 deletions src/qml/components/MessagesView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

import QtQuick 2.6
import QtQuick
import QtQuick.Controls

import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0

import org.nemomobile.messages.internal 1.0
import org.nemomobile.commhistory 1.0
import Nemo
import Nemo.Controls

Item {
property alias model: view.model
Expand Down
9 changes: 4 additions & 5 deletions src/qml/components/TargetEditBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import QtQuick
import QtQuick.Controls

import QtQuick 2.6

import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import Nemo
import Nemo.Controls

Item {
id: targetEdirBox
Expand Down
31 changes: 5 additions & 26 deletions src/qml/glacier-messages.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,46 +30,25 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

import QtQuick 2.6
import QtQuick
import QtQuick.Controls
import QtQuick.Window

import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import Nemo
import Nemo.Controls

import org.nemomobile.messages.internal 1.0
import org.nemomobile.contacts 1.0
import org.nemomobile.commhistory 1.0

import "components"
import "pages"

ApplicationWindow {
id: app

// Shared AccountsModel
TelepathyAccountsModel {
id: accountsModel
}

PeopleModel {
id: peopleModel
}

TelepathyChannelManager {
id: channelManager
handlerName: "qmlmessages"
}

CommGroupManager {
id: groupManager
useBackgroundThread: true
}

CommGroupModel {
id: groupModel
manager: groupManager
}

MessagesService{
id: messageService

Expand Down
10 changes: 5 additions & 5 deletions src/qml/pages/ConversationListPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

import QtQuick 2.6
import QtQuick
import QtQuick.Controls

import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import Nemo
import Nemo.Controls

import "../components"

Expand All @@ -47,7 +47,7 @@ Page {
ToolButton{
iconSource: "image://theme/user-plus"
onClicked: {
pageStack.push(Qt.resolvedUrl("../pages/ConversationPage.qml"), {add : true});
app.push(Qt.resolvedUrl("../pages/ConversationPage.qml"), {add : true});
}
}
]
Expand Down
24 changes: 4 additions & 20 deletions src/qml/pages/ConversationPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

import QtQuick 2.6

import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0

import org.nemomobile.messages.internal 1.0
import org.nemomobile.qmlcontacts 1.0
import org.nemomobile.commhistory 1.0
import org.nemomobile.voicecall 1.0
import QtQuick
import QtQuick.Controls

import Nemo
import Nemo.Controls

import "../components"

Expand Down Expand Up @@ -77,10 +71,6 @@ Page {
markAsRead()
}

VoiceCallManager {
id:callManager
}

TextField {
id: targetEditor
visible: !channel
Expand All @@ -99,12 +89,6 @@ Page {

}

CommConversationModel {
id: conversationModel
useBackgroundThread: true
groupId: group ? group.id : -1
}

MessagesView {
id: messagesView
anchors {
Expand Down

0 comments on commit abee075

Please sign in to comment.