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 8ce5fa3 commit a551505
Show file tree
Hide file tree
Showing 16 changed files with 131 additions and 98 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Expand Up @@ -8,23 +8,23 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_INSTALL_PREFIX /usr)

include(FeatureSummary)
include(GNUInstallDirs)

set(INSTALL_QML_IMPORT_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/qt/qml"
set(INSTALL_QML_IMPORT_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/qt6/qml"
CACHE PATH "Custom QML import installation directory")

set(QT_MIN_VERSION "5.11.0")
find_package(Qt5 COMPONENTS Gui Qml Quick LinguistTools REQUIRED)
find_package(Glacier 0.8.0 COMPONENTS App REQUIRED)
find_package(Qt5QuickCompiler)
set(QT_MIN_VERSION "6.0.0")
find_package(Qt6 COMPONENTS Gui Qml Quick 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-contacts translations)

Expand Down
8 changes: 4 additions & 4 deletions src/CMakeLists.txt
Expand Up @@ -2,14 +2,14 @@ set(SRC
main.cpp
)

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

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

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

install(TARGETS glacier-contacts RUNTIME
Expand Down
10 changes: 5 additions & 5 deletions src/qml/api/ContactAvatarImage.qml
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011-2012 Robin Burchell <robin+mer@viroteck.net>
* Copyright (C) 2021 Chupligin Sergey <neochapay@gmail.com>
* Copyright (C) 2021-2023 Chupligin Sergey <neochapay@gmail.com>
* You may use this file under the terms of the BSD license as follows:
*
* "Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -29,11 +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 Nemo
import Nemo.Controls

import Nemo.Thumbnailer 1.0
import org.nemomobile.contacts 1.0
Expand Down
10 changes: 5 additions & 5 deletions src/qml/api/ContactListDelegate.qml
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011-2012 Robin Burchell <robin+mer@viroteck.net>
* Copyright (C) 2021 Chupligin Sergey <neochapay@gmail.com>
* Copyright (C) 2021-2023 Chupligin Sergey <neochapay@gmail.com>
*
* You may use this file under the terms of the BSD license as follows:
*
Expand Down 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

ListViewItemWithActions {
id: card
Expand Down
10 changes: 5 additions & 5 deletions src/qml/api/ContactListWidget.qml
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011-2012 Robin Burchell <robin+mer@viroteck.net>
* Copyright (C) 2021 Chupligin Sergey <neochapay@gmail.com>
* Copyright (C) 2021-2023 Chupligin Sergey <neochapay@gmail.com>
*
* You may use this file under the terms of the BSD license as follows:
*
Expand Down 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

ListView {
id: groupedViewPortrait
Expand Down
12 changes: 6 additions & 6 deletions src/qml/components/AvatarPickerSheet.qml
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2012 Jolla Ltd.
* Copyright (C) 2011-2012 Robin Burchell <robin+mer@viroteck.net>
* Copyright (C) 2018-2021 Chupligin Sergey <neochapay@gmail.com>
* Copyright (C) 2018-2023 Chupligin Sergey <neochapay@gmail.com>
*
* You may use this file under the terms of the BSD license as follows:
*
Expand Down Expand Up @@ -31,11 +31,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 Nemo.Thumbnailer 1.0
import org.nemomobile.gallery 1.0
Expand Down Expand Up @@ -108,7 +108,7 @@ Page {
if(avatarGridView.itemSelected) {
avatarGridView.itemSelected = false
} else {
pageStack.pop()
app.pop()
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/qml/components/ContactCardContentWidget.qml
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011-2012 Robin Burchell <robin+mer@viroteck.net>
* Copyright (C) 2018 Chupligin Sergey <neochapay@gmail.com>
* Copyright (C) 2018-2023 Chupligin Sergey <neochapay@gmail.com>
*
* You may use this file under the terms of the BSD license as follows:
*
Expand Down 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 org.nemomobile.contacts 1.0
import org.nemomobile.qmlcontacts 1.0
Expand Down
13 changes: 7 additions & 6 deletions src/qml/components/ContactImportSheet.qml
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2011-2012 Robin Burchell <robin+mer@viroteck.net>
* Copyright (C) 2012 Jolla Ltd.
* Copyright (C) 2023 Chupligin Sergey <neochapay@gmail.com>
*
* You may use this file under the terms of the BSD license as follows:
*
Expand Down Expand Up @@ -30,11 +31,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 org.nemomobile.contacts 1.0
import org.nemomobile.folderlistmodel 1.0
Expand Down Expand Up @@ -111,7 +112,7 @@ Page {
bottom: parent.bottom
}
onClicked: {
pageStack.pop()
app.pop()
}
}

Expand Down Expand Up @@ -149,7 +150,7 @@ Page {
headingText: qsTr("Import completed")
acceptText: qsTr("Ok")
onAccepted: {
pageStack.pop();
app.pop();
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/qml/components/DeleteContactDialog.qml
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011-2012 Robin Burchell <robin+mer@viroteck.net>
* Copyright (C) 2018 Chupligin Sergey <neochapay@gmail.com>
* Copyright (C) 2018-2023 Chupligin Sergey <neochapay@gmail.com>
*
* You may use this file under the terms of the BSD license as follows:
*
Expand Down 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 Nemo.Dialogs 1.0

Expand Down
10 changes: 5 additions & 5 deletions src/qml/components/EditableList.qml
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011-2012 Robin Burchell <robin+mer@viroteck.net>
*
* Copyright (C) 2023 Chupligin Sergey <neochapay@gmail.com>
* You may use this file under the terms of the BSD license as follows:
*
* "Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -29,11 +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 Nemo
import Nemo.Controls

import org.nemomobile.contacts 1.0

Expand Down
11 changes: 6 additions & 5 deletions src/qml/components/SearchBox.qml
Expand Up @@ -2,7 +2,7 @@
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 2012 Robin Burchell <robin+mer@viroteck.net>
** Copyright (C) 2018 Chupligin Sergey <neochapay@gmail.com>
** Copyright (C) 2018-2023 Chupligin Sergey <neochapay@gmail.com>
**
** $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,12 @@
**
****************************************************************************/

import QtQuick 2.6
import QtQuick
import QtQuick.Controls

import Nemo
import Nemo.Controls

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

Item {
id: root
Expand Down
10 changes: 5 additions & 5 deletions src/qml/glacier-contacts.qml
@@ -1,17 +1,17 @@
/*
* Copyright 2011 Intel Corporation.
* Copyright (C) 2017 Chupligin Sergey <neochapay@gmail.com>
* Copyright (C) 2017-2023 Chupligin Sergey <neochapay@gmail.com>
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
* http://www.apache.org/licenses/LICENSE-2.0
*/

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 org.nemomobile.contacts 1.0

Expand Down
43 changes: 37 additions & 6 deletions src/qml/pages/ContactAggListPage.qml
@@ -1,8 +1,39 @@
import QtQuick 2.6
/*
* Copyright (C) 2011-2012 Robin Burchell <robin+mer@viroteck.net>
* Copyright (C) 2023 Chupligin Sergey <neochapay@gmail.com>
* You may use this file under the terms of the BSD license as follows:
*
* "Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Nemo Mobile nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (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.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 Nemo.Dialogs 1.0

Expand Down Expand Up @@ -48,9 +79,9 @@ Page {
onClicked: {
onClicked: {
if (p.addressBook.isAggregate) {
pageStack.push(Qt.resolvedUrl("ContactAggListPage.qml"), { contact: p })
app.push(Qt.resolvedUrl("ContactAggListPage.qml"), { contact: p })
} else {
pageStack.push(Qt.resolvedUrl("ContactEditPage.qml"), { contact: p })
app.push(Qt.resolvedUrl("ContactEditPage.qml"), { contact: p })
}
}
}
Expand Down

0 comments on commit a551505

Please sign in to comment.