Skip to content

Commit

Permalink
Move to Qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
neochapay committed Oct 19, 2023
1 parent dfba583 commit a6827ee
Show file tree
Hide file tree
Showing 15 changed files with 134 additions and 139 deletions.
13 changes: 6 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.13.0)

project(glacier-dialer
VERSION 0.2.1
VERSION 0.3.0
DESCRIPTION "The Glacier dialer")

set(CMAKE_AUTOMOC ON)
Expand All @@ -13,20 +13,19 @@ set(CMAKE_INSTALL_PREFIX /usr)
include(FeatureSummary)
include(GNUInstallDirs)

set(QT_MIN_VERSION "5.11.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
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR}
qt6_create_translation(QM_FILES ${CMAKE_SOURCE_DIR}
translations/glacier-dialer_en.ts
translations/glacier-dialer_ru.ts)

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-dialer translations)

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

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

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

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fvisibility=hidden -fvisibility-inlines-hidden")
set(CMAKE_EXE_LINKER_FLAGS "-pie -rdynamic")

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


Expand Down
10 changes: 6 additions & 4 deletions src/qml/components/DialerButton.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright 2014 Aleksi Suomalainen <[email protected]>
* Copyright (C) 2023 Chupligin Sergey <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
Expand All @@ -17,10 +18,11 @@
* Boston, MA 02110-1301, USA.
*/

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

import Nemo
import Nemo.Controls

import org.nemomobile.contacts 1.0

Expand Down
10 changes: 6 additions & 4 deletions src/qml/components/NemoIconButton.qml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick
import QtQuick.Controls

import Nemo
import Nemo.Controls


NemoIcon {
signal clicked()
Expand Down
10 changes: 5 additions & 5 deletions src/qml/components/SearchBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 2012 Robin Burchell <[email protected]>
** Copyright (C) 2018-2022 Chupligin Sergey <[email protected]>
** Copyright (C) 2018-2023 Chupligin Sergey <[email protected]>
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
Expand Down Expand Up @@ -36,11 +36,11 @@
**
****************************************************************************/

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

Item {
id: root
Expand Down
19 changes: 11 additions & 8 deletions src/qml/glacier-dialer.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright 2014 Aleksi Suomalainen <[email protected]>
* Copyright (C) 2023 Chupligin Sergey <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
Expand All @@ -17,11 +18,13 @@
* Boston, MA 02110-1301, USA.
*/

import QtQuick 2.6
import QtQuick.Window 2.1
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick
import QtQuick.Controls
import QtQuick.Window

import Nemo
import Nemo.Controls

import org.nemomobile.voicecall 1.0
import org.nemomobile.contacts 1.0
import org.nemomobile.commhistory 1.0
Expand All @@ -48,7 +51,7 @@ ApplicationWindow

if(activeVoiceCall) {

pageItem.pageStack.push({
main.push({
"item": Qt.resolvedUrl("pages/CallView.qml"),
"properties": {
"main": main,
Expand All @@ -64,7 +67,7 @@ ApplicationWindow
main.raise()
}
} else {
pageItem.pageStack.pop()
main.pop()
main.activeVoiceCallPerson = null
main.hide();
}
Expand Down Expand Up @@ -94,7 +97,7 @@ ApplicationWindow
id: voicecallService

onOpenCallHistory: {
pageStack.push(Qt.resolvedUrl("pages/CallLogPage.qml"))
main.push(Qt.resolvedUrl("pages/CallLogPage.qml"))
main.raise()
}
}
Expand Down
13 changes: 7 additions & 6 deletions src/qml/pages/CallLogPage.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright 2014 Aleksi Suomalainen <[email protected]>
* Copyright 2018 Chupligin Sergey <[email protected]>
* Copyright 2018-2023 Chupligin Sergey <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
Expand All @@ -18,11 +18,12 @@
* Boston, MA 02110-1301, USA.
*/

import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Layouts 1.0
import QtQuick
import QtQuick.Controls

import Nemo
import Nemo.Controls

import org.nemomobile.contacts 1.0
import org.nemomobile.commhistory 1.0

Expand Down
11 changes: 6 additions & 5 deletions src/qml/pages/CallView.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright 2014 Aleksi Suomalainen <[email protected]>
* Copyright 2018-2021 Chupligin Sergey <[email protected]>
* Copyright 2018-2023 Chupligin Sergey <[email protected]>
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
Expand All @@ -16,10 +16,11 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick
import QtQuick.Controls

import Nemo
import Nemo.Controls

import org.nemomobile.contacts 1.0
import org.nemomobile.commhistory 1.0
Expand Down
14 changes: 8 additions & 6 deletions src/qml/pages/ContactDelegate.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright 2015 Aleksi Suomalainen <[email protected]>
* Copyright (C) 2023 Chupligin Sergey <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
Expand All @@ -16,11 +17,12 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Layouts 1.0
import QtQuick
import QtQuick.Controls

import Nemo
import Nemo.Controls

import org.nemomobile.contacts 1.0

Item {
Expand Down Expand Up @@ -59,7 +61,7 @@ Item {
onPressAndHold: {
var comp = Qt.createComponent("ContactDetails.qml")
if (comp.status === Component.Ready) {
pageStack.push({
main.push({
"item": comp,
"properties": {
"person": person
Expand Down
12 changes: 7 additions & 5 deletions src/qml/pages/ContactDetails.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright 2015 Aleksi Suomalainen <[email protected]>
* Copyright (C) 2023 Chupligin Sergey <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
Expand All @@ -16,11 +17,12 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Layouts 1.0
import QtQuick
import QtQuick.Controls

import Nemo
import Nemo.Controls

import org.nemomobile.contacts 1.0

Page {
Expand Down
12 changes: 6 additions & 6 deletions src/qml/pages/ContactsPage.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright 2015 Aleksi Suomalainen <[email protected]>
* Copyright (C) 2022 Chupligin Sergey <[email protected]>
* Copyright (C) 2022-2023 Chupligin Sergey <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
Expand All @@ -18,11 +18,11 @@
* Boston, MA 02110-1301, USA.
*/

import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Layouts 1.0
import QtQuick
import QtQuick.Controls

import Nemo
import Nemo.Controls

import org.nemomobile.contacts 1.0
import org.nemomobile.qmlcontacts 1.0
Expand Down
12 changes: 7 additions & 5 deletions src/qml/pages/DialerPage.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright 2014 Aleksi Suomalainen <[email protected]>
* Copyright (C) 2023 Chupligin Sergey <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
Expand All @@ -16,11 +17,12 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Layouts 1.0
import QtQuick
import QtQuick.Controls

import Nemo
import Nemo.Controls

import org.nemomobile.contacts 1.0
import QOfono 0.2
import Nemo.Dialogs 1.0
Expand Down
15 changes: 8 additions & 7 deletions src/qml/pages/FirstPage.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright 2014 Aleksi Suomalainen <[email protected]>
* Copyright (C) 2023 Chupligin Sergey <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
Expand All @@ -17,11 +18,11 @@
* Boston, MA 02110-1301, USA.
*/

import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Layouts 1.0
import QtQuick
import QtQuick.Controls

import Nemo
import Nemo.Controls

import org.nemomobile.voicecall 1.0
import org.nemomobile.contacts 1.0
Expand All @@ -37,13 +38,13 @@ Page {
ToolButton {
iconSource: "image://theme/history"
onClicked: {
pageStack.push(Qt.resolvedUrl("CallLogPage.qml"));
main.push(Qt.resolvedUrl("CallLogPage.qml"));
}
},
ToolButton {
iconSource: "image://theme/search"
onClicked: {
pageStack.push(Qt.resolvedUrl("ContactsPage.qml"));
main.push(Qt.resolvedUrl("ContactsPage.qml"));
}
}
]
Expand Down
Loading

0 comments on commit a6827ee

Please sign in to comment.