[Merge] with upstream and fix conflicts

This commit is contained in:
Philip 2017-09-26 05:08:09 -04:00
commit 921440375a
138 changed files with 1184 additions and 1224 deletions

29
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,29 @@
#### Submission type
- [ ] Bug report
- [ ] Feature Request
#### Info regarding which version of Calamares is used, which Distribution
> …
#### Provide information on how the disks are set up, in detail, with full logs of commands issued
> …
#### What do you expect to have happen when Calamares installs?
> …
#### Describe the issue you encountered
> …
#### Steps to reproduce the problem
> …
#### Include the installation.log:
> …

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "thirdparty/libcrashreporter-qt"]
path = thirdparty/libcrashreporter-qt
url = https://github.com/dschmidt/libcrashreporter-qt

View File

@ -1 +1,2 @@
Teo Mrnjavac <teo@kde.org>
Adriaan de Groot <groot@kde.org>

View File

@ -1,4 +1,22 @@
### CMakeLists.txt for Calamares
# === This file is part of Calamares - <https://github.com/calamares> ===
#
# Calamares is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Calamares is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Calamares. If not, see <http://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: GPL-3.0+
# License-Filename: LICENSE
#
###
#
# Generally, this CMakeLists.txt will find all the dependencies for Calamares
# and complain appropriately. See below (later in this file) for CMake-level
@ -11,7 +29,7 @@
#
# cmake . -DSKIP_MODULES="partition luksbootkeycfg"
project( calamares CXX )
project( calamares C CXX )
cmake_minimum_required( VERSION 3.2 )
@ -30,7 +48,30 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set( CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG" )
set( CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-padded" )
# Clang warnings: doing *everything* is counter-productive, since it warns
# about things which we can't fix (e.g. C++98 incompatibilities, but
# Calaares is C++14).
foreach( CLANG_WARNINGS
-Weverything
-Wno-c++98-compat
-Wno-c++98-compat-pedantic
-Wno-padded
-Wno-undefined-reinterpret-cast
-Wno-global-constructors
-Wno-exit-time-destructors
-Wno-missing-prototypes
-Wno-documentation-unknown-command
)
string( APPEND CMAKE_CXX_FLAGS " ${CLANG_WARNINGS}" )
endforeach()
# Third-party code where we don't care so much about compiler warnings
# (because it's uncomfortable to patch) get different flags; use
# mark_thirdparty_code( <file> [<file>...] )
# to switch off warnings for those sources.
set( SUPPRESS_3RDPARTY_WARNINGS "-Wno-everything" )
set( SUPPRESS_BOOST_WARNINGS " -Wno-zero-as-null-pointer-constant -Wno-disabled-macro-expansion" )
set( CMAKE_CXX_FLAGS_DEBUG "-g" )
set( CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG" )
set( CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG" )
@ -42,8 +83,19 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
else()
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--no-undefined" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--fatal-warnings -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type" )
set( SUPPRESS_3RDPARTY_WARNINGS "" )
set( SUPPRESS_BOOST_WARNINGS "" )
endif()
macro(mark_thirdparty_code)
set_source_files_properties( ${ARGV}
PROPERTIES
COMPILE_FLAGS "${SUPPRESS_3RDPARTY_WARNINGS}"
COMPILE_DEFINITIONS "THIRDPARTY"
)
endmacro()
if( CMAKE_COMPILER_IS_GNUCXX )
if( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9 OR
CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.9 )
@ -52,12 +104,7 @@ if( CMAKE_COMPILER_IS_GNUCXX )
endif()
endif()
cmake_policy( SET CMP0023 OLD )
cmake_policy( SET CMP0028 NEW ) # double colons in KF5::Foo and Qt5::Foo are necessarily IMPORTED or ALIAS targets, don't search further
cmake_policy( SET CMP0043 OLD )
include( MacroOptionalFindPackage )
include( MacroLogFeature )
include( FeatureSummary )
set( QT_VERSION 5.6.0 )
@ -65,9 +112,8 @@ find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Core Gui Widgets LinguistTools S
find_package( YAMLCPP 0.5.1 REQUIRED )
find_package( PolkitQt5-1 REQUIRED )
option( WITH_PYTHON "Enable Python modules API (requires Boost.Python)." ON )
option( WITH_CRASHREPORTER "Build with CrashReporter" ON )
option( INSTALL_CONFIG "Install configuration files" ON )
option( WITH_PYTHON "Enable Python modules API (requires Boost.Python)." ON )
option( WITH_PYTHONQT "Enable next generation Python modules API (experimental, requires PythonQt)." OFF )
option( BUILD_TESTING "Build the testing tree." ON )
@ -75,40 +121,27 @@ if( BUILD_TESTING )
enable_testing()
endif ()
if( CMAKE_SYSTEM_PROCESSOR MATCHES "arm" OR NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libcrashreporter-qt/CMakeLists.txt" )
message( STATUS "Build of crashreporter disabled." )
set( WITH_CRASHREPORTER OFF )
endif()
macro_optional_find_package( PythonLibs 3.3 )
macro_log_feature(
PYTHONLIBS_FOUND
"Python"
"C interface libraries for the Python 3 interpreter."
"http://python.org"
FALSE "3.3"
"Python 3 is used for some Calamares job modules."
find_package( PythonLibs 3.3 )
set_package_properties(
PythonLibs PROPERTIES
DESCRIPTION "C interface libraries for the Python 3 interpreter."
URL "http://python.org"
PURPOSE "Python 3 is used for Python job modules."
)
if ( PYTHONLIBS_FOUND )
include( BoostPython3 )
find_boost_python3( 1.54.0 ${PYTHONLIBS_VERSION_STRING} CALAMARES_BOOST_PYTHON3_FOUND )
macro_log_feature(
CALAMARES_BOOST_PYTHON3_FOUND
"Boost.Python"
"A C++ library which enables seamless interoperability between C++ and Python 3."
"http://www.boost.org"
FALSE "1.54.0"
"Boost.Python is used for interfacing with Calamares job modules written in Python 3."
set_package_properties(
Boost PROPERTIES
PURPOSE "Boost.Python is used for Python job modules."
)
macro_optional_find_package( PythonQt )
macro_log_feature( PYTHONQT_FOUND
"PythonQt"
"A Python embedding solution for Qt applications."
"http://pythonqt.sourceforge.net"
FALSE "3.1"
"PythonQt is used for the Python modules API."
find_package( PythonQt )
set_package_properties( PythonQt PROPERTIES
DESCRIPTION "A Python embedding solution for Qt applications."
URL "http://pythonqt.sourceforge.net"
PURPOSE "PythonQt is used for Python view modules."
)
endif()
@ -131,7 +164,7 @@ set( CALAMARES_TRANSLATION_LANGUAGES ar ast bg ca cs_CZ da de el en en_GB es_MX
### Bump version here
set( CALAMARES_VERSION_MAJOR 3 )
set( CALAMARES_VERSION_MINOR 1 )
set( CALAMARES_VERSION_PATCH 4 )
set( CALAMARES_VERSION_PATCH 5 )
set( CALAMARES_VERSION_RC 0 )
set( CALAMARES_VERSION ${CALAMARES_VERSION_MAJOR}.${CALAMARES_VERSION_MINOR}.${CALAMARES_VERSION_PATCH} )
@ -203,13 +236,13 @@ set( THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/thirdparty" )
# make example-distro
#
find_program( mksquashfs_PROGRAM mksquashfs )
macro_log_feature( mksquashfs_PROGRAM "mksquashfs" "Create example distro" "http://tldp.org/HOWTO/SquashFS-HOWTO/creatingandusing.html")
if( mksquashfs_PROGRAM )
set( mksquashfs_FOUND ON )
set( src_fs ${CMAKE_SOURCE_DIR}/data/example-root/ )
set( dst_fs ${CMAKE_BINARY_DIR}/example.sqfs )
if( EXISTS ${src_fs} )
# Collect directories needed for a minimal binary distro,
# based on the build host. If /lib64 exists, assume it is needed.
# Collect directories needed for a minimal binary distro,
# Note that the last path component is added to the root, so
# if you add /usr/sbin here, it will be put into /sbin_1.
# Add such paths to /etc/profile under ${src_fs}.
@ -227,24 +260,26 @@ if( mksquashfs_PROGRAM )
)
add_custom_target(example-distro DEPENDS ${dst_fs})
endif()
else()
set( mksquashfs_FOUND OFF )
endif()
# Doesn't list mksquashfs as an optional dep, though, because it
# hasn't been sent through the find_package() scheme.
set_package_properties( mksquashfs PROPERTIES
DESCRIPTION "Create squashed filesystems"
URL "http://tldp.org/HOWTO/SquashFS-HOWTO/creatingandusing.html"
PURPOSE "Create example distro"
TYPE OPTIONAL
)
add_subdirectory( thirdparty )
# add_subdirectory( thirdparty )
add_subdirectory( src )
macro_display_feature_log()
add_feature_info(Python ${WITH_PYTHON} "Python job modules")
add_feature_info(PythonQt ${WITH_PYTHONQT} "Python view modules")
add_feature_info(Config ${INSTALL_CONFIG} "Install Calamares configuration")
if( NOT WITH_PYTHON )
message( "-- WARNING: Building Calamares without Python support. Legacy Python job modules will not work.\n" )
endif()
if( NOT WITH_PYTHONQT )
message( "-- WARNING: Building Calamares without PythonQt support. Python modules will not work.\n" )
endif()
if( NOT INSTALL_CONFIG )
message( "-- WARNING: Configuration files will not be installed.\n" )
endif()
feature_summary(WHAT ALL)
# Add all targets to the build-tree export set
set( CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/Calamares" CACHE PATH "Installation directory for CMake files" )

View File

@ -20,38 +20,50 @@
# "python-$dotsuffix", where suffix is based on the `python_version` argument.
# One can supply a custom component name by setting the
# `CALAMARES_BOOST_PYTHON3_COMPONENT` variable at CMake time.
set( CALAMARES_BOOST_PYTHON3_COMPONENT python3 CACHE STRING
"Name of the Boost.Python component. If Boost.Python is installed as
libboost_python-foo.so then this variable should be set to 'python-foo'."
)
macro( find_boost_python3 boost_version python_version found_var )
set( ${found_var} OFF )
include(FindPackageHandleStandardArgs)
# turns "3.4.123abc" into "34"
string( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\..*" "\\1\\2" _fbp_python_short_version ${python_version} )
foreach( _fbp_name ${CALAMARES_BOOST_PYTHON3_COMPONENT} python-py${_fbp_python_short_version} )
macro( _find_boost_python3_int boost_version componentname found_var )
foreach( _fbp_name ${CALAMARES_BOOST_PYTHON3_COMPONENT} ${componentname} )
find_package( Boost ${boost_version} QUIET COMPONENTS ${_fbp_name} )
string( TOUPPER ${_fbp_name} _fbp_uc_name )
if( Boost_${_fbp_uc_name}_FOUND )
set( ${found_var} ON )
set( ${found_var} ${_fbp_uc_name} )
break()
endif()
endforeach()
endmacro()
if (NOT ${found_var})
macro( find_boost_python3 boost_version python_version found_var )
set( ${found_var} OFF )
set( _fbp_found OFF )
# turns "3.4.123abc" into "34"
string( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\..*" "\\1\\2" _fbp_python_short_version ${python_version} )
_find_boost_python3_int( ${boost_version} python-py${_fbp_python_short_version} _fbp_found )
if (NOT _fbp_found)
# The following loop changes the searched name for Gentoo based distributions
# turns "3.4.123abc" into "3.4"
string( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\..*" "\\1.\\2" _fbp_python_short_version ${python_version} )
foreach( _fbp_name ${CALAMARES_BOOST_PYTHON3_COMPONENT} python-${_fbp_python_short_version} )
find_package( Boost ${boost_version} QUIET COMPONENTS ${_fbp_name} )
string( TOUPPER ${_fbp_name} _fbp_uc_name )
if( Boost_${_fbp_uc_name}_FOUND )
set( ${found_var} ON )
break()
endif()
endforeach()
_find_boost_python3_int( ${boost_version} python-${_fbp_python_short_version} _fbp_found )
endif()
set( ${found_var} ${_fbp_found} )
# This is superfluous, but allows proper reporting in the features list
if ( _fbp_found )
find_package( Boost ${boost_version} COMPONENTS ${_fbp_found} )
else()
find_package( Boost ${boost_version} COMPONENTS Python )
endif()
set_package_properties(
Boost PROPERTIES
DESCRIPTION "A C++ library which enables seamless interoperability between C++ and Python 3."
URL "http://www.boost.org"
)
endmacro()

View File

@ -45,9 +45,6 @@ function(calamares_add_library)
add_library(${target} SHARED ${LIBRARY_SOURCES})
endif()
# HACK: add qt modules - every lib should define its own set of modules
qt5_use_modules(${target} Core Gui Widgets ${LIBRARY_QT5_MODULES})
# definitions - can this be moved into set_target_properties below?
add_definitions(${QT_DEFINITIONS})
set_target_properties(${target} PROPERTIES AUTOMOC TRUE)
@ -67,9 +64,15 @@ function(calamares_add_library)
endif()
# add link targets
target_link_libraries(${target} ${CALAMARES_LIBRARIES})
target_link_libraries(${target}
LINK_PUBLIC ${CALAMARES_LIBRARIES}
Qt5::Core
Qt5::Gui
Qt5::Widgets
${LIBRARY_QT5_MODULES}
)
if(LIBRARY_LINK_LIBRARIES)
target_link_libraries(${target} ${LIBRARY_LINK_LIBRARIES})
target_link_libraries(${target} LINK_PUBLIC ${LIBRARY_LINK_LIBRARIES})
endif()
if(LIBRARY_LINK_PRIVATE_LIBRARIES)
target_link_libraries(${target} LINK_PRIVATE ${LIBRARY_LINK_PRIVATE_LIBRARIES})

View File

@ -5,19 +5,30 @@
# LIBCRYPT_LIBRARY, the path to libcrypt
# LIBCRYPT_FOUND, whether libcrypt was found
if( CMAKE_SYSTEM MATCHES "FreeBSD" )
# FreeBSD has crypt(3) declared in unistd.h, which lives in
# libc; the libcrypt found here is not used.
find_path( CRYPT_INCLUDE_DIR NAMES unistd.h )
add_definitions( -DNO_CRYPT_H )
else()
find_path( CRYPT_INCLUDE_DIR
NAMES crypt.h
HINTS
${CMAKE_INSTALL_INCLUDEDIR}
NO_CACHE
)
endif()
find_path( CRYPT_INCLUDE_DIR NAMES crypt.h
HINTS
${CMAKE_INSTALL_INCLUDEDIR}
)
find_library( CRYPT_LIBRARIES NAMES crypt
find_library( CRYPT_LIBRARIES
NAMES crypt
HINTS
${CMAKE_INSTALL_LIBDIR}
)
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( Crypt
REQUIRED_VARS CRYPT_LIBRARIES CRYPT_INCLUDE_DIR )
find_package_handle_standard_args(
Crypt
REQUIRED_VARS CRYPT_LIBRARIES CRYPT_INCLUDE_DIR
)
mark_as_advanced( CRYPT_INCLUDE_DIR CRYPT_LIBRARIES )

View File

@ -1,157 +0,0 @@
# This file defines the Feature Logging macros.
#
# MACRO_LOG_FEATURE(VAR FEATURE DESCRIPTION URL [REQUIRED [MIN_VERSION [COMMENTS]]])
# Logs the information so that it can be displayed at the end
# of the configure run
# VAR : TRUE or FALSE, indicating whether the feature is supported
# FEATURE: name of the feature, e.g. "libjpeg"
# DESCRIPTION: description what this feature provides
# URL: home page
# REQUIRED: TRUE or FALSE, indicating whether the featue is required
# MIN_VERSION: minimum version number. empty string if unneeded
# COMMENTS: More info you may want to provide. empty string if unnecessary
#
# MACRO_DISPLAY_FEATURE_LOG()
# Call this to display the collected results.
# Exits CMake with a FATAL error message if a required feature is missing
#
# Example:
#
# INCLUDE(MacroLogFeature)
#
# FIND_PACKAGE(JPEG)
# MACRO_LOG_FEATURE(JPEG_FOUND "libjpeg" "Support JPEG images" "http://www.ijg.org" TRUE "3.2a" "")
# ...
# MACRO_DISPLAY_FEATURE_LOG()
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
# Copyright (c) 2006, Allen Winter, <winter@kde.org>
# Copyright (c) 2009, Sebastian Trueg, <trueg@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
IF (NOT _macroLogFeatureAlreadyIncluded)
SET(_file ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
IF (EXISTS ${_file})
FILE(REMOVE ${_file})
ENDIF (EXISTS ${_file})
SET(_file ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
IF (EXISTS ${_file})
FILE(REMOVE ${_file})
ENDIF (EXISTS ${_file})
SET(_file ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
IF (EXISTS ${_file})
FILE(REMOVE ${_file})
ENDIF (EXISTS ${_file})
SET(_macroLogFeatureAlreadyIncluded TRUE)
INCLUDE(FeatureSummary)
ENDIF (NOT _macroLogFeatureAlreadyIncluded)
MACRO(MACRO_LOG_FEATURE _var _package _description _url ) # _required _minvers _comments)
STRING(TOUPPER "${ARGV4}" _required)
SET(_minvers "${ARGV5}")
SET(_comments "${ARGV6}")
IF (${_var})
SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
ELSE (${_var})
IF ("${_required}" STREQUAL "TRUE")
SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
ELSE ("${_required}" STREQUAL "TRUE")
SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
ENDIF ("${_required}" STREQUAL "TRUE")
ENDIF (${_var})
SET(_logtext " * ${_package}")
IF (NOT ${_var})
IF (${_minvers} MATCHES ".*")
SET(_logtext "${_logtext} (${_minvers} or higher)")
ENDIF (${_minvers} MATCHES ".*")
SET(_logtext "${_logtext} <${_url}>\n ")
ELSE (NOT ${_var})
SET(_logtext "${_logtext} - ")
ENDIF (NOT ${_var})
SET(_logtext "${_logtext}${_description}")
IF (NOT ${_var})
IF (${_comments} MATCHES ".*")
SET(_logtext "${_logtext}\n ${_comments}")
ENDIF (${_comments} MATCHES ".*")
# SET(_logtext "${_logtext}\n") #double-space missing features?
ENDIF (NOT ${_var})
FILE(APPEND "${_LOGFILENAME}" "${_logtext}\n")
IF(COMMAND SET_PACKAGE_INFO) # in FeatureSummary.cmake since CMake 2.8.3
SET_PACKAGE_INFO("${_package}" "\"${_description}\"" "${_url}" "\"${_comments}\"")
ENDIF(COMMAND SET_PACKAGE_INFO)
ENDMACRO(MACRO_LOG_FEATURE)
MACRO(MACRO_DISPLAY_FEATURE_LOG)
IF(COMMAND FEATURE_SUMMARY) # in FeatureSummary.cmake since CMake 2.8.3
FEATURE_SUMMARY(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/FindPackageLog.txt
WHAT ALL)
ENDIF(COMMAND FEATURE_SUMMARY)
SET(_missingFile ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
SET(_enabledFile ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
SET(_disabledFile ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
IF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile})
SET(_printSummary TRUE)
ENDIF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile})
IF(_printSummary)
SET(_missingDeps 0)
IF (EXISTS ${_enabledFile})
FILE(READ ${_enabledFile} _enabled)
FILE(REMOVE ${_enabledFile})
SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following external packages were located on your system.\n-- This installation will have the extra features provided by these packages.\n-----------------------------------------------------------------------------\n${_enabled}")
ENDIF (EXISTS ${_enabledFile})
IF (EXISTS ${_disabledFile})
SET(_missingDeps 1)
FILE(READ ${_disabledFile} _disabled)
FILE(REMOVE ${_disabledFile})
SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following OPTIONAL packages could NOT be located on your system.\n-- Consider installing them to enable more features from this software.\n-----------------------------------------------------------------------------\n${_disabled}")
ENDIF (EXISTS ${_disabledFile})
IF (EXISTS ${_missingFile})
SET(_missingDeps 1)
FILE(READ ${_missingFile} _requirements)
SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following REQUIRED packages could NOT be located on your system.\n-- You must install these packages before continuing.\n-----------------------------------------------------------------------------\n${_requirements}")
FILE(REMOVE ${_missingFile})
SET(_haveMissingReq 1)
ENDIF (EXISTS ${_missingFile})
IF (NOT ${_missingDeps})
SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- Congratulations! All external packages have been found.")
ENDIF (NOT ${_missingDeps})
MESSAGE(${_summary})
MESSAGE("-----------------------------------------------------------------------------\n")
IF(_haveMissingReq)
MESSAGE(FATAL_ERROR "Exiting: Missing Requirements")
ENDIF(_haveMissingReq)
ENDIF(_printSummary)
ENDMACRO(MACRO_DISPLAY_FEATURE_LOG)

View File

@ -1,48 +0,0 @@
# - MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION()
# MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] )
# This macro is a combination of OPTION() and FIND_PACKAGE(), it
# works like FIND_PACKAGE(), but additionally it automatically creates
# an option name WITH_<name>, which can be disabled via the cmake GUI.
# or via -DWITH_<name>=OFF
# The standard <name>_FOUND variables can be used in the same way
# as when using the normal FIND_PACKAGE()
# Copyright (c) 2006-2010 Alexander Neundorf, <neundorf@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# This is just a helper macro to set a bunch of variables empty.
# We don't know whether the package uses UPPERCASENAME or CamelCaseName, so we try both:
macro(_MOFP_SET_EMPTY_IF_DEFINED _name _var)
if(DEFINED ${_name}_${_var})
set(${_name}_${_var} "")
endif(DEFINED ${_name}_${_var})
string(TOUPPER ${_name} _nameUpper)
if(DEFINED ${_nameUpper}_${_var})
set(${_nameUpper}_${_var} "")
endif(DEFINED ${_nameUpper}_${_var})
endmacro(_MOFP_SET_EMPTY_IF_DEFINED _package _var)
macro (MACRO_OPTIONAL_FIND_PACKAGE _name )
option(WITH_${_name} "Search for ${_name} package" ON)
if (WITH_${_name})
find_package(${_name} ${ARGN})
else (WITH_${_name})
string(TOUPPER ${_name} _nameUpper)
set(${_name}_FOUND FALSE)
set(${_nameUpper}_FOUND FALSE)
_mofp_set_empty_if_defined(${_name} INCLUDE_DIRS)
_mofp_set_empty_if_defined(${_name} INCLUDE_DIR)
_mofp_set_empty_if_defined(${_name} INCLUDES)
_mofp_set_empty_if_defined(${_name} LIBRARY)
_mofp_set_empty_if_defined(${_name} LIBRARIES)
_mofp_set_empty_if_defined(${_name} LIBS)
_mofp_set_empty_if_defined(${_name} FLAGS)
_mofp_set_empty_if_defined(${_name} DEFINITIONS)
endif (WITH_${_name})
endmacro (MACRO_OPTIONAL_FIND_PACKAGE)

View File

@ -0,0 +1,16 @@
/*
* Copyright 2012, Christian Muehlhaeuser <muesli@tomahawk-player.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

View File

@ -0,0 +1,18 @@
/***********************************************
Copyright (C) 2014 Schutz Sacha
This file is part of QJsonModel (https://github.com/dridk/QJsonmodel).
QJsonModel is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QJsonModel is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QJsonModel. If not, see <http://www.gnu.org/licenses/>.
**********************************************/

View File

@ -0,0 +1,83 @@
/****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QML Presentation System.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QML Presentation System.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
**
** $QT_END_LICENSE$
**
****************************************************************************/

View File

@ -0,0 +1,22 @@
Digia Qt LGPL Exception version 1.1
As an additional permission to the GNU Lesser General Public License version
2.1, the object code form of a "work that uses the Library" may incorporate
material from a header file that is part of the Library. You may distribute
such object code under terms of your choice, provided that:
(i) the header files of the Library have not been modified; and
(ii) the incorporated material is limited to numerical parameters, data
structure layouts, accessors, macros, inline functions and
templates; and
(iii) you comply with the terms of Section 6 of the GNU Lesser General
Public License version 2.1.
Moreover, you may apply this exception to a modified version of the Library,
provided that such modification does not involve copying material from the
Library into the modified Library's header files unless such material is
limited to (i) numerical parameters; (ii) data structure layouts;
(iii) accessors; and (iv) small macros, templates and inline functions of
five lines or less in length.
Furthermore, you are not required to apply this additional permission to a
modified version of the Library.

View File

@ -7,7 +7,7 @@
[![Coverity Scan Build Status](https://scan.coverity.com/projects/5389/badge.svg)](https://scan.coverity.com/projects/5389)
[![GitHub license](https://img.shields.io/github/license/calamares/calamares.svg)](https://github.com/calamares/calamares/blob/master/LICENSE)
| [Report a Bug](https://calamares.io/bugs/) | [Contribute](https://github.com/calamares/calamares/blob/master/HACKING.md) | [Translate](https://www.transifex.com/projects/p/calamares/) | Freenode (IRC): #calamares | [Wiki](https://github.com/calamares/calamares/wiki) |
| [Report a Bug](https://github.com/calamares/calamares/issues/new) | [Contribute](https://github.com/calamares/calamares/blob/master/ci/HACKING.md) | [Translate](https://www.transifex.com/projects/p/calamares/) | Freenode (IRC): #calamares | [Wiki](https://github.com/calamares/calamares/wiki) |
|:-----------------------------------------:|:----------------------:|:-----------------------:|:--------------------------:|:--------------------------:|
### Dependencies

View File

@ -11,6 +11,8 @@ Icon=calamares
Terminal=false
StartupNotify=true
Categories=Qt;System;
Name[ca]=Calamares
Icon[ca]=calamares
GenericName[ca]=Instal·lador de sistema

View File

@ -30,11 +30,6 @@ The Calamares release process
* Check `README.md` and everything in `hacking`, make sure it's all still
relevant. Run `hacking/calamaresstyle` to check the C++ code style.
Python code is checked as part of the Travis CI builds.
* Update submodules.
```
git submodule # Note list of submodules
git submodule update thirdparty/libcrashreporter-qt
```
* Check defaults in `settings.conf` and other configuration files.
* Pull latest translations from Transifex. This is done nightly on Jenkins,
so a manual pull is rarely necessary.
@ -43,8 +38,13 @@ The Calamares release process
fairly complete translations.
#### (2) Tarball
* Create tarball: `git-archive-all -v calamares-1.1-rc1.tar.gz` . Double check
that the tarball matches the version number.
* Create tarball: `git-archive-all -v calamares-1.1-rc1.tar.gz` or without
the helper script,
```
V=calamares-3.1.5
git archive -o $V.tar.gz --prefix $V/ master
```
Double check that the tarball matches the version number.
* Test tarball.
#### (3) Tag

View File

@ -43,6 +43,14 @@ BOILERPLATE="Automatic merge of Transifex translations"
git add --verbose lang/calamares*.ts
git commit "$AUTHOR" --message="[core] $BOILERPLATE" | true
rm -f lang/desktop*.desktop
awk '
BEGIN {skip=0;}
/^# Translations/ {skip=1;}
{if (!skip || (length($0)>1 && $0 != "# Translations")) {
skip=0; print $0;
}}' < calamares.desktop > calamares.desktop.new
mv calamares.desktop.new calamares.desktop
git add --verbose calamares.desktop
git commit "$AUTHOR" --message="[desktop] $BOILERPLATE" | true

View File

@ -1162,12 +1162,12 @@ Instalační program bude ukončen a všechny změny ztraceny.</translation>
<message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="66"/>
<source>&amp;Cancel</source>
<translation type="unfinished"/>
<translation>&amp;Zrušit</translation>
</message>
<message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="67"/>
<source>&amp;OK</source>
<translation type="unfinished"/>
<translation>&amp;OK</translation>
</message>
</context>
<context>

View File

@ -173,7 +173,7 @@ Output:
<message>
<location filename="../src/libcalamares/ProcessJob.cpp" line="111"/>
<source>External command finished with errors</source>
<translation>Ekstern kommando blev færdiggjort uden fejl</translation>
<translation>Ekstern kommando blev færdiggjort med fejl</translation>
</message>
<message>
<location filename="../src/libcalamares/ProcessJob.cpp" line="112"/>
@ -702,7 +702,7 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt.</translation
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionTableJob.cpp" line="66"/>
<source>Creating new %1 partition table on %2.</source>
<translation>Opretter ny %1 partitionstabel %2.</translation>
<translation>Opretter ny %1-partitionstabel %2.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/CreatePartitionTableJob.cpp" line="76"/>
@ -984,7 +984,7 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt.</translation
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="147"/>
<source>Install %1 on &lt;strong&gt;new&lt;/strong&gt; %2 system partition.</source>
<translation>Installér %1 den &lt;strong&gt;nye&lt;/strong&gt; %2 systempartition.</translation>
<translation>Installér %1 &lt;strong&gt;nye&lt;/strong&gt; %2-systempartition.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="151"/>
@ -994,7 +994,7 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt.</translation
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="159"/>
<source>Install %2 on %3 system partition &lt;strong&gt;%1&lt;/strong&gt;.</source>
<translation>Installér %2 %3 systempartition &lt;strong&gt;%1&lt;/strong&gt;.</translation>
<translation>Installér %2 %3-systempartition &lt;strong&gt;%1&lt;/strong&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="164"/>
@ -1772,7 +1772,7 @@ Installationsprogrammet vil stoppe og alle ændringer vil gå tabt.</translation
<message>
<location filename="../src/modules/partition/gui/ReplaceWidget.cpp" line="216"/>
<source>%1 system partition (%2)</source>
<translation>%1 systempartition (%2)</translation>
<translation>%1-systempartition (%2)</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/ReplaceWidget.cpp" line="227"/>

View File

@ -71,18 +71,18 @@
<message>
<location filename="../src/libcalamaresui/utils/DebugWindow.ui" line="57"/>
<source>Type:</source>
<translation type="unfinished"/>
<translation>Tipo:</translation>
</message>
<message>
<location filename="../src/libcalamaresui/utils/DebugWindow.ui" line="64"/>
<location filename="../src/libcalamaresui/utils/DebugWindow.ui" line="78"/>
<source>none</source>
<translation type="unfinished"/>
<translation>Non</translation>
</message>
<message>
<location filename="../src/libcalamaresui/utils/DebugWindow.ui" line="71"/>
<source>Interface:</source>
<translation type="unfinished"/>
<translation>Interface</translation>
</message>
<message>
<location filename="../src/libcalamaresui/utils/DebugWindow.ui" line="93"/>
@ -241,7 +241,7 @@ Saída:
<location filename="../src/libcalamaresui/ViewManager.cpp" line="76"/>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="310"/>
<source>Cancel installation without changing the system.</source>
<translation type="unfinished"/>
<translation>Cancela-la instalación sen cambia-lo sistema</translation>
</message>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="99"/>
@ -258,17 +258,17 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="105"/>
<source>&amp;Yes</source>
<translation type="unfinished"/>
<translation>&amp;Si</translation>
</message>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="106"/>
<source>&amp;No</source>
<translation type="unfinished"/>
<translation>&amp;Non</translation>
</message>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="186"/>
<source>&amp;Close</source>
<translation type="unfinished"/>
<translation>&amp;Pechar</translation>
</message>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="238"/>
@ -293,12 +293,12 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="276"/>
<source>&amp;Done</source>
<translation type="unfinished"/>
<translation>&amp;Feito</translation>
</message>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="277"/>
<source>The installation is complete. Close the installer.</source>
<translation type="unfinished"/>
<translation>Completouse a instalacion. Peche o instalador</translation>
</message>
<message>
<location filename="../src/libcalamaresui/ViewManager.cpp" line="183"/>
@ -554,7 +554,7 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/modules/partition/gui/CreatePartitionDialog.ui" line="48"/>
<source> MiB</source>
<translation type="unfinished"/>
<translation>MiB</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/CreatePartitionDialog.ui" line="55"/>
@ -614,7 +614,7 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/modules/partition/gui/CreatePartitionDialog.cpp" line="269"/>
<source>Mountpoint already in use. Please select another one.</source>
<translation type="unfinished"/>
<translation>Punto de montaxe xa en uso. Faga o favor de escoller outro</translation>
</message>
</context>
<context>
@ -827,32 +827,32 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/modules/partition/gui/DeviceInfoWidget.cpp" line="150"/>
<source>The type of &lt;strong&gt;partition table&lt;/strong&gt; on the selected storage device.&lt;br&gt;&lt;br&gt;The only way to change the partition table type is to erase and recreate the partition table from scratch, which destroys all data on the storage device.&lt;br&gt;This installer will keep the current partition table unless you explicitly choose otherwise.&lt;br&gt;If unsure, on modern systems GPT is preferred.</source>
<translation type="unfinished"/>
<translation>O tipo de &lt;strong&gt;táboa de partición&lt;/strong&gt;no dispositivo de almacenamento escollido.&lt;br&gt;&lt;br&gt;O único xeito de cambia-lo tipo de partición é borrar e volver a crear a táboa de partición dende o comenzo, isto destrúe todolos datos no dispositivo de almacenamento. &lt;br&gt; Este instalador manterá a táboa de partición actúal agás que escolla outra cousa explicitamente. &lt;br&gt; Se non está seguro, en sistemas modernos é preferibel GPT.</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/DeviceInfoWidget.cpp" line="107"/>
<source>This device has a &lt;strong&gt;%1&lt;/strong&gt; partition table.</source>
<translation type="unfinished"/>
<translation>O dispositivo ten &lt;strong&gt;%1&lt;/strong&gt; una táboa de partición.</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/DeviceInfoWidget.cpp" line="114"/>
<source>This is a &lt;strong&gt;loop&lt;/strong&gt; device.&lt;br&gt;&lt;br&gt;It is a pseudo-device with no partition table that makes a file accessible as a block device. This kind of setup usually only contains a single filesystem.</source>
<translation type="unfinished"/>
<translation>Este é un dispositivo de tipo &lt;strong&gt;loop&lt;/strong&gt;. &lt;br&gt;&lt;br&gt; É un pseudo-dispositivo que non ten táboa de partición que permita acceder aos ficheiros como un dispositivo de bloques. Este,modo de configuración normalmente so contén un sistema de ficheiros individual.</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/DeviceInfoWidget.cpp" line="121"/>
<source>This installer &lt;strong&gt;cannot detect a partition table&lt;/strong&gt; on the selected storage device.&lt;br&gt;&lt;br&gt;The device either has no partition table, or the partition table is corrupted or of an unknown type.&lt;br&gt;This installer can create a new partition table for you, either automatically, or through the manual partitioning page.</source>
<translation type="unfinished"/>
<translation>Este instalador &lt;strong&gt;non pode detectar unha táboa de partición &lt;/strong&gt;no sistema de almacenamento seleccionado. &lt;br&gt;&lt;br&gt;O dispositivo non ten táboa de particion ou a táboa de partición está corrompida ou é dun tipo descoñecido.&lt;br&gt;Este instalador poder crear una táboa de partición nova por vóstede, ben automaticamente ou a través de páxina de particionamento a man. </translation>
</message>
<message>
<location filename="../src/modules/partition/gui/DeviceInfoWidget.cpp" line="131"/>
<source>&lt;br&gt;&lt;br&gt;This is the recommended partition table type for modern systems which start from an &lt;strong&gt;EFI&lt;/strong&gt; boot environment.</source>
<translation type="unfinished"/>
<translation>&lt;br&gt;&lt;br&gt;Este é o tipo de táboa de partición recomendada para sistema modernos que empezan dende un sistema de arranque &lt;strong&gt;EFI&lt;/strong&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/DeviceInfoWidget.cpp" line="137"/>
<source>&lt;br&gt;&lt;br&gt;This partition table type is only advisable on older systems which start from a &lt;strong&gt;BIOS&lt;/strong&gt; boot environment. GPT is recommended in most other cases.&lt;br&gt;&lt;br&gt;&lt;strong&gt;Warning:&lt;/strong&gt; the MBR partition table is an obsolete MS-DOS era standard.&lt;br&gt;Only 4 &lt;em&gt;primary&lt;/em&gt; partitions may be created, and of those 4, one can be an &lt;em&gt;extended&lt;/em&gt; partition, which may in turn contain many &lt;em&gt;logical&lt;/em&gt; partitions.</source>
<translation type="unfinished"/>
<translation>&lt;br&gt;&lt;br&gt;Esta táboa de partición so é recomendabel en sistemas vellos que empezan dende un sistema de arranque &lt;strong&gt;BIOS&lt;/strong&gt;. GPT é recomendabel na meirande parte dos outros casos.&lt;br&gt;&lt;br&gt;&lt;strong&gt;Atención:&lt;/strong&gt;A táboa de partición MBR é un estándar obsoleto da época do MS-DOS.&lt;br&gt;So pódense crear 4 particións &lt;em&gt;primarias&lt;/em&gt;, e desas 4, una pode ser unha partición&lt;em&gt;extensa&lt;/em&gt;, que pode conter muitas particións &lt;em&gt;lóxicas&lt;/em&gt;.</translation>
</message>
</context>
<context>
@ -868,17 +868,17 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/modules/dracutlukscfg/DracutLuksCfgJob.cpp" line="131"/>
<source>Write LUKS configuration for Dracut to %1</source>
<translation type="unfinished"/>
<translation>Escribila configuración LUKS para Dracut en %1</translation>
</message>
<message>
<location filename="../src/modules/dracutlukscfg/DracutLuksCfgJob.cpp" line="133"/>
<source>Skip writing LUKS configuration for Dracut: &quot;/&quot; partition is not encrypted</source>
<translation type="unfinished"/>
<translation>Saltando escribila configuración LUKS para Dracut: A partición &quot;/&quot; non está encriptada</translation>
</message>
<message>
<location filename="../src/modules/dracutlukscfg/DracutLuksCfgJob.cpp" line="149"/>
<source>Failed to open %1</source>
<translation type="unfinished"/>
<translation>Fallou ao abrir %1</translation>
</message>
</context>
<context>
@ -894,27 +894,27 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/modules/partition/gui/EditExistingPartitionDialog.ui" line="20"/>
<source>Edit Existing Partition</source>
<translation type="unfinished"/>
<translation>Editar unha partición existente</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/EditExistingPartitionDialog.ui" line="50"/>
<source>Content:</source>
<translation type="unfinished"/>
<translation>Contido:</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/EditExistingPartitionDialog.ui" line="60"/>
<source>&amp;Keep</source>
<translation type="unfinished"/>
<translation>&amp;Gardar</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/EditExistingPartitionDialog.ui" line="70"/>
<source>Format</source>
<translation type="unfinished"/>
<translation>Formato</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/EditExistingPartitionDialog.ui" line="89"/>
<source>Warning: Formatting the partition will erase all existing data.</source>
<translation type="unfinished"/>
<translation>Atención: Dar formato á partición borrará tódolos datos existentes.</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/EditExistingPartitionDialog.ui" line="99"/>
@ -929,22 +929,22 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/modules/partition/gui/EditExistingPartitionDialog.ui" line="129"/>
<source> MiB</source>
<translation type="unfinished"/>
<translation>MiB</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/EditExistingPartitionDialog.ui" line="136"/>
<source>Fi&amp;le System:</source>
<translation type="unfinished"/>
<translation>Sistema de Ficheiros:</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/EditExistingPartitionDialog.ui" line="149"/>
<source>Flags:</source>
<translation type="unfinished"/>
<translation>Bandeiras:</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/EditExistingPartitionDialog.cpp" line="307"/>
<source>Mountpoint already in use. Please select another one.</source>
<translation type="unfinished"/>
<translation>Punto de montaxe xa en uso. Faga o favor de escoller outro.</translation>
</message>
</context>
<context>
@ -952,27 +952,27 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/modules/partition/gui/EncryptWidget.ui" line="14"/>
<source>Form</source>
<translation type="unfinished"/>
<translation>Formulario</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/EncryptWidget.ui" line="32"/>
<source>En&amp;crypt system</source>
<translation type="unfinished"/>
<translation>En&amp;criptar sistema</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/EncryptWidget.ui" line="42"/>
<source>Passphrase</source>
<translation type="unfinished"/>
<translation>Frase de contrasinal</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/EncryptWidget.ui" line="52"/>
<source>Confirm passphrase</source>
<translation type="unfinished"/>
<translation>Confirme a frase de contrasinal</translation>
</message>
<message>
<location filename="../src/modules/partition/gui/EncryptWidget.cpp" line="151"/>
<source>Please enter the same passphrase in both boxes.</source>
<translation type="unfinished"/>
<translation>Faga o favor de introducila a misma frase de contrasinal námbalas dúas caixas.</translation>
</message>
</context>
<context>
@ -980,37 +980,37 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="123"/>
<source>Set partition information</source>
<translation type="unfinished"/>
<translation>Poñela información da partición</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="147"/>
<source>Install %1 on &lt;strong&gt;new&lt;/strong&gt; %2 system partition.</source>
<translation type="unfinished"/>
<translation>Instalar %1 nunha &lt;strong&gt;nova&lt;/strong&gt; partición do sistema %2</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="151"/>
<source>Set up &lt;strong&gt;new&lt;/strong&gt; %2 partition with mount point &lt;strong&gt;%1&lt;/strong&gt;.</source>
<translation type="unfinished"/>
<translation>Configure unha &lt;strong&gt;nova&lt;/strong&gt; partición %2 con punto de montaxe &lt;strong&gt;%1&lt;/strong&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="159"/>
<source>Install %2 on %3 system partition &lt;strong&gt;%1&lt;/strong&gt;.</source>
<translation type="unfinished"/>
<translation>Instalar %2 na partición do sistema %3 &lt;strong&gt;%1&lt;/strong&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="164"/>
<source>Set up %3 partition &lt;strong&gt;%1&lt;/strong&gt; with mount point &lt;strong&gt;%2&lt;/strong&gt;.</source>
<translation type="unfinished"/>
<translation>Configurala partición %3 &lt;strong&gt;%1&lt;/strong&gt; con punto de montaxe &lt;strong&gt;%2&lt;/strong&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="176"/>
<source>Install boot loader on &lt;strong&gt;%1&lt;/strong&gt;.</source>
<translation type="unfinished"/>
<translation>Instalar o cargador de arranque en &lt;strong&gt;%1&lt;/strong&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FillGlobalStorageJob.cpp" line="186"/>
<source>Setting up mount points.</source>
<translation type="unfinished"/>
<translation>Configuralos puntos de montaxe.</translation>
</message>
</context>
<context>
@ -1023,17 +1023,17 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/modules/finished/FinishedPage.ui" line="77"/>
<source>&amp;Restart now</source>
<translation type="unfinished"/>
<translation>&amp;Reiniciar agora.</translation>
</message>
<message>
<location filename="../src/modules/finished/FinishedPage.cpp" line="52"/>
<source>&lt;h1&gt;All done.&lt;/h1&gt;&lt;br/&gt;%1 has been installed on your computer.&lt;br/&gt;You may now restart into your new system, or continue using the %2 Live environment.</source>
<translation type="unfinished"/>
<translation>&lt;h1&gt;Todo feito.&lt;/h1&gt;&lt;br/&gt;%1 foi instalado na súa computadora.&lt;br/&gt;Agora pode reiniciar no seu novo sistema ou continuar a usalo entorno Live %2.</translation>
</message>
<message>
<location filename="../src/modules/finished/FinishedPage.cpp" line="110"/>
<source>&lt;h1&gt;Installation Failed&lt;/h1&gt;&lt;br/&gt;%1 has not been installed on your computer.&lt;br/&gt;The error message was: %2.</source>
<translation type="unfinished"/>
<translation>&lt;h1&gt;Fallou a instalación&lt;/h1&gt;&lt;br/&gt;%1 non se pudo instalar na sua computadora. &lt;br/&gt;A mensaxe de erro foi: %2.</translation>
</message>
</context>
<context>
@ -1041,17 +1041,17 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/modules/finished/FinishedViewStep.cpp" line="60"/>
<source>Finish</source>
<translation type="unfinished"/>
<translation>Fin</translation>
</message>
<message>
<location filename="../src/modules/finished/FinishedViewStep.cpp" line="126"/>
<source>Installation Complete</source>
<translation type="unfinished"/>
<translation>Instalacion completa</translation>
</message>
<message>
<location filename="../src/modules/finished/FinishedViewStep.cpp" line="127"/>
<source>The installation of %1 is complete.</source>
<translation type="unfinished"/>
<translation>Completouse a instalación de %1</translation>
</message>
</context>
<context>
@ -1059,22 +1059,22 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/modules/partition/jobs/FormatPartitionJob.cpp" line="49"/>
<source>Format partition %1 (file system: %2, size: %3 MB) on %4.</source>
<translation type="unfinished"/>
<translation>Formato da partición %1 (sistema de ficheiros: %2, tamaño: %3 MB) en %4.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FormatPartitionJob.cpp" line="60"/>
<source>Format &lt;strong&gt;%3MB&lt;/strong&gt; partition &lt;strong&gt;%1&lt;/strong&gt; with file system &lt;strong&gt;%2&lt;/strong&gt;.</source>
<translation type="unfinished"/>
<translation>Formato &lt;strong&gt;%3MB&lt;/strong&gt; partición &lt;strong&gt;%1&lt;/strong&gt; con sistema de ficheiros &lt;strong&gt;%2&lt;/strong&gt;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FormatPartitionJob.cpp" line="71"/>
<source>Formatting partition %1 with file system %2.</source>
<translation type="unfinished"/>
<translation>Dando formato a %1 con sistema de ficheiros %2.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FormatPartitionJob.cpp" line="83"/>
<source>The installer failed to format partition %1 on disk &apos;%2&apos;.</source>
<translation type="unfinished"/>
<translation>O instalador fallou cando formateaba a partición %1 no disco &apos;%2&apos;.</translation>
</message>
<message>
<location filename="../src/modules/partition/jobs/FormatPartitionJob.cpp" line="91"/>
@ -1104,19 +1104,19 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<location filename="../src/modules/interactiveterminal/InteractiveTerminalPage.cpp" line="84"/>
<location filename="../src/modules/interactiveterminal/InteractiveTerminalPage.cpp" line="96"/>
<source>Konsole not installed</source>
<translation type="unfinished"/>
<translation>Konsole non está instalado</translation>
</message>
<message>
<location filename="../src/modules/interactiveterminal/InteractiveTerminalPage.cpp" line="70"/>
<location filename="../src/modules/interactiveterminal/InteractiveTerminalPage.cpp" line="85"/>
<location filename="../src/modules/interactiveterminal/InteractiveTerminalPage.cpp" line="97"/>
<source>Please install the kde konsole and try again!</source>
<translation type="unfinished"/>
<translation>Faga o favor de instalar konsole (de kde) e probe de novo!</translation>
</message>
<message>
<location filename="../src/modules/interactiveterminal/InteractiveTerminalPage.cpp" line="122"/>
<source>Executing script: &amp;nbsp;&lt;code&gt;%1&lt;/code&gt;</source>
<translation type="unfinished"/>
<translation>Executando o script: &amp;nbsp; &lt;code&gt;%1&lt;/code&gt;</translation>
</message>
</context>
<context>
@ -1132,12 +1132,12 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/modules/keyboard/KeyboardPage.cpp" line="208"/>
<source>Set keyboard model to %1.&lt;br/&gt;</source>
<translation type="unfinished"/>
<translation>Seleccionado modelo de teclado a %1.&lt;br/&gt;</translation>
</message>
<message>
<location filename="../src/modules/keyboard/KeyboardPage.cpp" line="210"/>
<source>Set keyboard layout to %1/%2.</source>
<translation type="unfinished"/>
<translation>Seleccionada a disposición do teclado a %1/%2.</translation>
</message>
</context>
<context>
@ -1145,7 +1145,7 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/modules/keyboard/KeyboardViewStep.cpp" line="50"/>
<source>Keyboard</source>
<translation type="unfinished"/>
<translation>Teclado</translation>
</message>
</context>
<context>
@ -1153,22 +1153,22 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="34"/>
<source>System locale setting</source>
<translation type="unfinished"/>
<translation>Configuración da localización</translation>
</message>
<message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="41"/>
<source>The system locale setting affects the language and character set for some command line user interface elements.&lt;br/&gt;The current setting is &lt;strong&gt;%1&lt;/strong&gt;.</source>
<translation type="unfinished"/>
<translation>A configuración de localización afecta a linguaxe e o conxunto de caracteres dalgúns elementos da interface de usuario de liña de comandos. &lt;br/&gt;A configuración actúal é &lt;strong&gt;%1&lt;/strong&gt;.</translation>
</message>
<message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="66"/>
<source>&amp;Cancel</source>
<translation type="unfinished"/>
<translation>&amp;Cancelar</translation>
</message>
<message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="67"/>
<source>&amp;OK</source>
<translation type="unfinished"/>
<translation>&amp;Ok</translation>
</message>
</context>
<context>
@ -1181,33 +1181,33 @@ O instalador pecharase e perderanse todos os cambios.</translation>
<message>
<location filename="../src/modules/license/LicensePage.cpp" line="88"/>
<source>I accept the terms and conditions above.</source>
<translation type="unfinished"/>
<translation>Acepto os termos e condicións anteriores.</translation>
</message>
<message>
<location filename="../src/modules/license/LicensePage.cpp" line="115"/>
<source>&lt;h1&gt;License Agreement&lt;/h1&gt;This setup procedure will install proprietary software that is subject to licensing terms.</source>
<translation type="unfinished"/>
<translation>&lt;h1&gt;Acordo de licencia&lt;/h1&gt;Este proceso de configuración instalará programas privativos suxeito a termos de licencia.</translation>
</message>
<message>
<location filename="../src/modules/license/LicensePage.cpp" line="118"/>
<source>Please review the End User License Agreements (EULAs) above.&lt;br/&gt;If you do not agree with the terms, the setup procedure cannot continue.</source>
<translation type="unfinished"/>
<translation>Faga o favor de revisalos Acordos de Licencia de Usuario Final (ALUF) seguintes. &lt;br/&gt;De non estar dacordo cos termos non se pode seguir co proceso de configuración.</translation>
</message>
<message>
<location filename="../src/modules/license/LicensePage.cpp" line="124"/>
<source>&lt;h1&gt;License Agreement&lt;/h1&gt;This setup procedure can install proprietary software that is subject to licensing terms in order to provide additional features and enhance the user experience.</source>
<translation type="unfinished"/>
<translation>&lt;h1&gt;Acordo de licencia&lt;/h1&gt;Este proceso de configuración pode instalar programas privativos suxeito a termos de licencia para fornecer características adicionaís e mellorala experiencia do usuario.</translation>
</message>
<message>
<location filename="../src/modules/license/LicensePage.cpp" line="129"/>
<source>Please review the End User License Agreements (EULAs) above.&lt;br/&gt;If you do not agree with the terms, proprietary software will not be installed, and open source alternatives will be used instead.</source>
<translation type="unfinished"/>
<translation>Faga o favor de revisalos Acordos de Licencia de Usuario Final (ALUF) seguintes. &lt;br/&gt;De non estar dacordo cos termos non se instalará o programa privativo e no seu lugar usaranse alternativas de código aberto.</translation>
</message>
<message>
<location filename="../src/modules/license/LicensePage.cpp" line="159"/>
<source>&lt;strong&gt;%1 driver&lt;/strong&gt;&lt;br/&gt;by %2</source>
<extracomment>%1 is an untranslatable product name, example: Creative Audigy driver</extracomment>
<translation type="unfinished"/>
<translation>&lt;strong&gt;dispositivo %1&lt;/strong&gt;&lt;br/&gt;por %2</translation>
</message>
<message>
<location filename="../src/modules/license/LicensePage.cpp" line="166"/>

View File

@ -1050,7 +1050,7 @@ Uppsetningarforritið mun hætta og allar breytingar tapast.</translation>
<message>
<location filename="../src/modules/finished/FinishedViewStep.cpp" line="127"/>
<source>The installation of %1 is complete.</source>
<translation type="unfinished"/>
<translation>Uppsetningu af %1 er lokið.</translation>
</message>
</context>
<context>
@ -1162,12 +1162,12 @@ Uppsetningarforritið mun hætta og allar breytingar tapast.</translation>
<message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="66"/>
<source>&amp;Cancel</source>
<translation type="unfinished"/>
<translation>&amp;Hætta við</translation>
</message>
<message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="67"/>
<source>&amp;OK</source>
<translation type="unfinished"/>
<translation>&amp;Í lagi</translation>
</message>
</context>
<context>
@ -1857,7 +1857,7 @@ Uppsetningarforritið mun hætta og allar breytingar tapast.</translation>
<message>
<location filename="../src/modules/welcome/checker/RequirementsChecker.cpp" line="153"/>
<source>The screen is too small to display the installer.</source>
<translation type="unfinished"/>
<translation>Skjárinn er of lítill til birta uppsetningarforritið.</translation>
</message>
</context>
<context>

View File

@ -1163,12 +1163,12 @@ The installer will quit and all changes will be lost.</source>
<message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="66"/>
<source>&amp;Cancel</source>
<translation type="unfinished"/>
<translation>&amp;C</translation>
</message>
<message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="67"/>
<source>&amp;OK</source>
<translation type="unfinished"/>
<translation>&amp;O</translation>
</message>
</context>
<context>

View File

@ -1162,12 +1162,12 @@ Instalator zostanie zamknięty i wszystkie zmiany zostaną utracone.</translatio
<message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="66"/>
<source>&amp;Cancel</source>
<translation type="unfinished"/>
<translation>&amp;Anuluj</translation>
</message>
<message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="67"/>
<source>&amp;OK</source>
<translation type="unfinished"/>
<translation>&amp;OK</translation>
</message>
</context>
<context>

View File

@ -1164,12 +1164,12 @@ A instalação pode continuar, mas alguns recursos podem ser desativados.</trans
<message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="66"/>
<source>&amp;Cancel</source>
<translation type="unfinished"/>
<translation>&amp;Cancelar</translation>
</message>
<message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="67"/>
<source>&amp;OK</source>
<translation type="unfinished"/>
<translation>&amp;OK</translation>
</message>
</context>
<context>

View File

@ -1165,12 +1165,12 @@ Kuruluma devam edebilirsiniz fakat bazı özellikler devre dışı kalabilir.</t
<message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="66"/>
<source>&amp;Cancel</source>
<translation type="unfinished"/>
<translation>&amp;Vazgeç</translation>
</message>
<message>
<location filename="../src/modules/locale/LCLocaleDialog.cpp" line="67"/>
<source>&amp;OK</source>
<translation type="unfinished"/>
<translation>&amp;TAMAM</translation>
</message>
</context>
<context>

View File

@ -53,4 +53,4 @@ msgstr[2] ""
#: src/modules/packages/main.py:68
msgid "Install packages."
msgstr ""
msgstr "Instalovat balíčky."

Binary file not shown.

View File

@ -33,22 +33,22 @@ msgstr "Dummy python step {}"
#: src/modules/packages/main.py:59
#, python-format
msgid "Processing packages (%(count)d / %(total)d)"
msgstr ""
msgstr "Vinnslupakkar (%(count)d / %(total)d)"
#: src/modules/packages/main.py:61
#, python-format
msgid "Installing one package."
msgid_plural "Installing %(num)d packages."
msgstr[0] ""
msgstr[1] ""
msgstr[0] "Setja upp einn pakka."
msgstr[1] "Setur upp %(num)d pakka."
#: src/modules/packages/main.py:64
#, python-format
msgid "Removing one package."
msgid_plural "Removing %(num)d packages."
msgstr[0] ""
msgstr[1] ""
msgstr[0] "Fjarlægi einn pakka."
msgstr[1] "Fjarlægi %(num)d pakka."
#: src/modules/packages/main.py:68
msgid "Install packages."
msgstr ""
msgstr "Setja upp pakka."

Binary file not shown.

View File

@ -33,20 +33,20 @@ msgstr "Dummy python step {}"
#: src/modules/packages/main.py:59
#, python-format
msgid "Processing packages (%(count)d / %(total)d)"
msgstr ""
msgstr "パッケージの処理中 (%(count)d / %(total)d)"
#: src/modules/packages/main.py:61
#, python-format
msgid "Installing one package."
msgid_plural "Installing %(num)d packages."
msgstr[0] ""
msgstr[0] " %(num)d パッケージのインストール中。"
#: src/modules/packages/main.py:64
#, python-format
msgid "Removing one package."
msgid_plural "Removing %(num)d packages."
msgstr[0] ""
msgstr[0] " %(num)d パッケージの削除中。"
#: src/modules/packages/main.py:68
msgid "Install packages."
msgstr ""
msgstr "パッケージのインストール"

Binary file not shown.

View File

@ -33,26 +33,26 @@ msgstr "Krok dummy python {}"
#: src/modules/packages/main.py:59
#, python-format
msgid "Processing packages (%(count)d / %(total)d)"
msgstr ""
msgstr "Przetwarzanie pakietów (%(count)d / %(total)d)"
#: src/modules/packages/main.py:61
#, python-format
msgid "Installing one package."
msgid_plural "Installing %(num)d packages."
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
msgstr[3] ""
msgstr[0] "Instalowanie jednego pakietu."
msgstr[1] "Instalowanie %(num)d pakietów."
msgstr[2] "Instalowanie %(num)d pakietów."
msgstr[3] "Instalowanie pakietów (%(num)d)."
#: src/modules/packages/main.py:64
#, python-format
msgid "Removing one package."
msgid_plural "Removing %(num)d packages."
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
msgstr[3] ""
msgstr[0] "Usuwanie jednego pakietu."
msgstr[1] "Usuwanie %(num)d pakietów."
msgstr[2] "Usuwanie %(num)d pakietów."
msgstr[3] "Usuwanie pakietów (%(num)d)."
#: src/modules/packages/main.py:68
msgid "Install packages."
msgstr ""
msgstr "Zainstaluj pakiety."

View File

@ -3,17 +3,18 @@ include( CalamaresAddModuleSubdirectory )
include( CalamaresAddLibrary )
include( CalamaresAddBrandingSubdirectory )
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/libcalamares )
include_directories( ${CMAKE_CURRENT_LIST_DIR}/libcalamares )
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
include_directories( ${CMAKE_CURRENT_LIST_DIR} )
include_directories(
${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/libcalamares
${CMAKE_CURRENT_LIST_DIR}/libcalamaresui
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/libcalamares
${CMAKE_CURRENT_BINARY_DIR}/libcalamaresui
)
# library
add_subdirectory( libcalamares )
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/libcalamaresui )
include_directories( ${CMAKE_CURRENT_LIST_DIR}/libcalamaresui )
add_subdirectory( libcalamaresui )
# all things qml
@ -27,7 +28,3 @@ add_subdirectory( modules )
# branding components
add_subdirectory( branding )
if( WITH_CRASHREPORTER )
add_subdirectory( crashreporter )
endif()

View File

@ -27,8 +27,6 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../libcalamares
${THIRDPARTY_DIR}/libcrashreporter-qt/src/
../libcalamares
../libcalamaresui
)
@ -51,11 +49,6 @@ SET_TARGET_PROPERTIES(calamares_bin
RUNTIME_OUTPUT_NAME calamares
)
if( WITH_CRASHREPORTER )
list( APPEND LINK_LIBRARIES ${LINK_LIBRARIES} pthread crashreporter-handler )
endif()
qt5_use_modules( calamares_bin Core Widgets )
target_link_libraries( calamares_bin
PRIVATE
${CALAMARES_LIBRARIES}

View File

@ -23,9 +23,6 @@
#include "utils/CalamaresUtils.h"
#include "utils/Logger.h"
#include "CalamaresConfig.h"
#ifdef WITH_CRASHREPORTER
#include "libcrashreporter-handler/Handler.h"
#endif
#include <QCommandLineParser>
#include <QDebug>
@ -36,13 +33,6 @@ main( int argc, char* argv[] )
{
CalamaresApplication a( argc, argv );
#ifdef WITH_CRASHREPORTER
CrashReporter::Handler* handler =
new CrashReporter::Handler( QDir::tempPath(),
true,
"calamares_crash_reporter" );
#endif
QCommandLineParser parser;
parser.setApplicationDescription( "Distribution-independent installer framework" );
parser.addHelpOption();

View File

@ -64,8 +64,6 @@ ProgressTreeDelegate::paint( QPainter* painter,
const QStyleOptionViewItem& option,
const QModelIndex& index) const
{
bool isFirstLevel = !index.parent().isValid();
QStyleOptionViewItem opt = option;
painter->save();

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -96,6 +97,10 @@ ProgressTreeModel::data( const QModelIndex& index, int role ) const
QVariant
ProgressTreeModel::headerData( int section, Qt::Orientation orientation, int role ) const
{
Q_UNUSED( section );
Q_UNUSED( orientation );
Q_UNUSED( role );
return QVariant();
}
@ -146,12 +151,11 @@ ProgressTreeModel::indexFromItem( ProgressTreeItem* item )
if ( !item || !item->parent() )
return QModelIndex();
// Reconstructs a QModelIndex from a ProgressTreeItem that is somewhere in the tree.
// Traverses the item to the root node, then rebuilds the qmodeindices from there
// Traverses the item to the root node, then rebuilds the qmodelindices from there
// back down; each int is the row of that item in the parent.
/**
* In this diagram, if the \param item is G, childIndexList will contain [0, 2, 0]
* In this diagram, if the item is G, childIndexList will contain [0, 2, 0]
*
* A
* D

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -39,7 +40,7 @@ public:
};
explicit ProgressTreeModel( QObject* parent = nullptr );
virtual ~ProgressTreeModel();
virtual ~ProgressTreeModel() override;
// Reimplemented from QAbstractItemModel
Qt::ItemFlags flags( const QModelIndex& index ) const override;

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -34,8 +35,8 @@ class ProgressTreeView : public QTreeView
public:
static ProgressTreeView* instance();
explicit ProgressTreeView( QWidget* parent = 0 );
virtual ~ProgressTreeView();
explicit ProgressTreeView( QWidget* parent = nullptr );
virtual ~ProgressTreeView() override;
/**
* @brief setModel assigns a model to this view.

View File

@ -46,6 +46,7 @@ void
ViewStepItem::appendChild( ProgressTreeItem* item )
{
Q_ASSERT( false );
Q_UNUSED( item );
}

View File

@ -1,47 +0,0 @@
PROJECT( CrashReporter )
cmake_policy(SET CMP0017 NEW)
set(CALAMARES_CRASH_REPORTER_TARGET calamares_crash_reporter)
list(APPEND crashreporter_SOURCES main.cpp)
list(APPEND crashreporter_RC resources.qrc)
qt5_wrap_ui( crashreporter_UI_HEADERS ${crashreporter_UI} )
qt5_add_resources( crashreporter_RC_RCC ${crashreporter_RC} )
if(BUILD_RELEASE)
set(CRASHREPORTER_RELEASE_CHANNEL "release")
else()
set(CRASHREPORTER_RELEASE_CHANNEL "nightly")
endif()
set(CRASHREPORTER_SUBMIT_URL "https://calamares.io/oops/addreport.php")
set(CRASHREPORTER_ICON ":/squid.svg")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CrashReporterConfig.h.in
${CMAKE_CURRENT_BINARY_DIR}/CrashReporterConfig.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR}
../../libcalamares
../../libcalamaresui
../../thirdparty/libcrashreporter-qt/src
)
add_executable( ${CALAMARES_CRASH_REPORTER_TARGET}
${crashreporter_SOURCES}
${crashreporter_HEADERS_MOC}
${crashreporter_UI_HEADERS}
${crashreporter_RC_RCC}
)
target_link_libraries( ${CALAMARES_CRASH_REPORTER_TARGET}
${CALAMARES_LIBRARIES}
crashreporter-gui
${QT_LIBRARIES}
)
set_target_properties(${CALAMARES_CRASH_REPORTER_TARGET} PROPERTIES AUTOMOC ON)
install(TARGETS ${CALAMARES_CRASH_REPORTER_TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR})
qt5_use_modules(${CALAMARES_CRASH_REPORTER_TARGET} Widgets Network)

View File

@ -1,23 +0,0 @@
#ifndef CRASHREPORTERCONFIG_H
#define CRASHREPORTERCONFIG_H
// QCoreApplication settings for QSettings
#cmakedefine CALAMARES_ORGANIZATION_NAME "${CALAMARES_ORGANIZATION_NAME}"
#cmakedefine CALAMARES_ORGANIZATION_DOMAIN "${CALAMARES_ORGANIZATION_DOMAIN}"
#cmakedefine CALAMARES_APPLICATION_NAME "${CALAMARES_APPLICATION_NAME}"
#cmakedefine CALAMARES_VERSION "${CALAMARES_VERSION}"
#define CRASHREPORTER_BUILD_ID "@CMAKE_DATESTAMP_YEAR@@CMAKE_DATESTAMP_MONTH@@CMAKE_DATESTAMP_DAY@000000"
#define CRASHREPORTER_RELEASE_CHANNEL "@CRASHREPORTER_RELEASE_CHANNEL@"
#define CRASHREPORTER_PRODUCT_NAME "@CALAMARES_APPLICATION_NAME@"
#define CRASHREPORTER_VERSION_STRING "@CALAMARES_VERSION_STRING@"
#define CRASHREPORTER_SUBMIT_URL "@CRASHREPORTER_SUBMIT_URL@"
#define CRASHREPORTER_ICON "@CRASHREPORTER_ICON@"
#endif // CRASHREPORTERCONFIG_H

View File

@ -1,166 +0,0 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Calamares is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libcrashreporter-gui/CrashReporter.h>
#include <libcrashreporter-gui/CrashReporterGzip.h>
#include "CrashReporterConfig.h"
#include <QTranslator>
#include <iostream>
#include <QApplication>
#include <QDir>
#include <QFileInfo>
#include "utils/CalamaresUtils.h"
#include "utils/Logger.h"
#include <numeric>
#ifdef Q_OS_WIN
#include <windows.h>
#include <unistd.h>
#endif
#ifdef Q_OS_LINUX
const char* k_usage =
"Usage:\n"
" CrashReporter <dumpFilePath> <linuxBacktracePath>\n";
#else
const char* k_usage =
"Usage:\n"
" CrashReporter <dumpFilePath>\n";
#endif
int main( int argc, char* argv[] )
{
#ifdef Q_OS_WIN // log to console window
if ( fileno( stdout ) != -1 && _get_osfhandle( fileno( stdout ) ) != -1 )
{
/* stdout is fine, presumably redirected to a file or pipe */
}
else
{
typedef BOOL (WINAPI * AttachConsole_t) (DWORD);
AttachConsole_t p_AttachConsole = (AttachConsole_t) GetProcAddress( GetModuleHandleW( L"kernel32.dll" ), "AttachConsole" );
if ( p_AttachConsole != NULL && p_AttachConsole( ATTACH_PARENT_PROCESS ) )
{
_wfreopen ( L"CONOUT$", L"w", stdout );
dup2( fileno( stdout ), 1 );
_wfreopen ( L"CONOUT$", L"w", stderr );
dup2( fileno( stderr ), 2 );
}
}
#endif
// used by some Qt stuff, eg QSettings
// leave first! As Settings object is created quickly
QCoreApplication::setOrganizationName( QLatin1String( CALAMARES_ORGANIZATION_NAME ) );
QCoreApplication::setOrganizationDomain( QLatin1String( CALAMARES_ORGANIZATION_DOMAIN ) );
QCoreApplication::setApplicationName( QLatin1String( CALAMARES_APPLICATION_NAME ) );
QCoreApplication::setApplicationVersion( QLatin1String( CALAMARES_VERSION ) );
QApplication app( argc, argv );
CalamaresUtils::installTranslator( QLocale::system(), QString(), &app );
#ifdef Q_OS_LINUX
if ( app.arguments().size() != 8 )
#else
if ( app.arguments().size() != 2 )
#endif
{
std::cout << k_usage;
return 1;
}
cDebug() << "Arguments list:" << app.arguments().join( ", " );
CrashReporter reporter( QUrl( CRASHREPORTER_SUBMIT_URL ), app.arguments() );
#ifdef CRASHREPORTER_ICON
reporter.setLogo( QPixmap( CRASHREPORTER_ICON ) );
#endif
reporter.setWindowTitle( CRASHREPORTER_PRODUCT_NAME );
reporter.setText("<html><head/><body><p><span style=\" font-weight:600;\">Sorry!"
"</span> " CRASHREPORTER_PRODUCT_NAME " crashed. Please tell us "
"about it! " CRASHREPORTER_PRODUCT_NAME " has created an error "
"report for you that can help improve the stability in the "
"future. You can now send this report directly to the "
CRASHREPORTER_PRODUCT_NAME " developers.</p><p>Can you tell us "
"what you were doing when this happened?</p></body></html>");
reporter.setBottomText(QString());
reporter.setReportData( "BuildID", CRASHREPORTER_BUILD_ID );
reporter.setReportData( "ProductName", CRASHREPORTER_PRODUCT_NAME );
reporter.setReportData( "Version", CRASHREPORTER_VERSION_STRING );
reporter.setReportData( "ReleaseChannel", CRASHREPORTER_RELEASE_CHANNEL);
//reporter.setReportData( "timestamp", QByteArray::number( QDateTime::currentDateTime().toTime_t() ) );
// add parameters
// QList<Pair> pairs;
// pairs //<< Pair( "BuildID", buildId.toUtf8() )
// << Pair( )
// //<< Pair( "Version", CalamaresUtils::appFriendlyVersion().toLocal8Bit() )
// //<< Pair( "Vendor", "Tomahawk" )
// //<< Pair( )
// << Pair("InstallTime", "1357622062")
// << Pair("Theme", "classic/1.0")
// << Pair("Version", "30")
// << Pair("id", "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}")
// << Pair("Vendor", "Mozilla")
// << Pair("EMCheckCompatibility", "true")
// << Pair("Throttleable", "0")
// << Pair("URL", "http://code.google.com/p/crashme/")
// << Pair("version", "20.0a1")
// << Pair("CrashTime", "1357770042")
// << Pair("submitted_timestamp", "2013-01-09T22:21:18.646733+00:00")
// << Pair("buildid", "20130107030932")
// << Pair("timestamp", "1357770078.646789")
// << Pair("Notes", "OpenGL: NVIDIA Corporation -- GeForce 8600M GT/PCIe/SSE2 -- 3.3.0 NVIDIA 313.09 -- texture_from_pixmap\r\n")
// << Pair("StartupTime", "1357769913")
// << Pair("FramePoisonSize", "4096")
// << Pair("FramePoisonBase", "7ffffffff0dea000")
// << Pair("Add-ons", "%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D:20.0a1,crashme%40ted.mielczarek.org:0.4")
// << Pair("SecondsSinceLastCrash", "1831736")
// << Pair("ProductName", "WaterWolf")
// << Pair("legacy_processing", "0")
// << Pair("ProductID", "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}")
;
// send log
QFile logFile( CalamaresUtils::appLogDir().filePath( "Calamares.log" ) );
logFile.open( QFile::ReadOnly );
reporter.setReportData( "upload_file_calamareslog",
gzip_compress( logFile.readAll() ),
"application/x-gzip",
QFileInfo( logFile ).fileName().toUtf8());
logFile.close();
reporter.show();
return app.exec();
}

View File

@ -1,5 +0,0 @@
<RCC>
<qresource prefix="/">
<file alias="squid.svg">../../data/images/squid.svg</file>
</qresource>
</RCC>

View File

@ -1,9 +1,11 @@
project( libcalamares )
project( libcalamares CXX )
add_definitions( ${QT_DEFINITIONS} )
add_definitions( -DQT_SHARED )
add_definitions( -DQT_SHAREDPOINTER_TRACK_POINTERS )
add_definitions( -DDLLEXPORT_PRO )
add_definitions(
${QT_DEFINITIONS}
-DQT_SHARED
-DQT_SHAREDPOINTER_TRACK_POINTERS
-DDLLEXPORT_PRO
)
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/CalamaresConfig.h.in
${CMAKE_CURRENT_BINARY_DIR}/CalamaresConfig.h )
@ -16,27 +18,27 @@ set( libSources
Job.cpp
JobQueue.cpp
ProcessJob.cpp
kdsingleapplicationguard/kdsingleapplicationguard.cpp
kdsingleapplicationguard/kdsharedmemorylocker.cpp
kdsingleapplicationguard/kdtoolsglobal.cpp
kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
)
set( utilsSources
utils/CalamaresUtils.cpp
utils/CalamaresUtilsSystem.cpp
utils/Logger.cpp
utils/PluginFactory.cpp
utils/Retranslator.cpp
)
set( kdsagSources
kdsingleapplicationguard/kdsingleapplicationguard.cpp
kdsingleapplicationguard/kdsharedmemorylocker.cpp
kdsingleapplicationguard/kdtoolsglobal.cpp
kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
)
mark_thirdparty_code( ${kdsagSources} )
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${QT_INCLUDE_DIR}
)
if( WITH_PYTHON )
set( libSources
${libSources}
@ -44,6 +46,9 @@ if( WITH_PYTHON )
PythonJob.cpp
PythonJobApi.cpp
)
set_source_files_properties( PythonJob.cpp
PROPERTIES COMPILE_FLAGS "${SUPPRESS_BOOST_WARNINGS}"
)
include_directories(${PYTHON_INCLUDE_DIRS})
link_directories(${PYTHON_LIBRARIES})
@ -73,7 +78,7 @@ if( WITH_PYTHONQT )
endif()
add_library( calamares SHARED ${libSources} )
add_library( calamares SHARED ${libSources} ${kdsagSources} ${utilsSources} )
set_target_properties( calamares
PROPERTIES
AUTOMOC TRUE
@ -81,17 +86,9 @@ set_target_properties( calamares
SOVERSION ${CALAMARES_VERSION_SHORT}
)
qt5_use_modules( calamares Core )
target_link_libraries( calamares
LINK_PRIVATE
# internal deps, if any
${OPTIONAL_PRIVATE_LIBRARIES}
LINK_PUBLIC
# External deps
Qt5::Core
LINK_PRIVATE ${OPTIONAL_PRIVATE_LIBRARIES}
LINK_PUBLIC Qt5::Core
)
install( TARGETS calamares

View File

@ -10,7 +10,6 @@
//cmakedefines for CMake variables (e.g. for optdepends) go here
#cmakedefine WITH_PYTHON
#cmakedefine WITH_CRASHREPORTER
#cmakedefine WITH_PYTHONQT
#endif // CALAMARESCONFIG_H

View File

@ -40,6 +40,8 @@ CppJob::setModuleInstanceKey( const QString& instanceKey )
void
CppJob::setConfigurationMap( const QVariantMap& configurationMap )
{}
{
Q_UNUSED( configurationMap );
}
}

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -32,7 +33,7 @@ public:
bool runInChroot = false,
int secondsTimeout = 30,
QObject* parent = nullptr );
virtual ~ProcessJob();
virtual ~ProcessJob() override;
QString prettyName() const override;
QString prettyStatusMessage() const override;

View File

@ -39,7 +39,7 @@ public:
const QString& workingPath,
const QVariantMap& moduleConfiguration = QVariantMap(),
QObject* parent = nullptr );
virtual ~PythonJob();
virtual ~PythonJob() override;
QString prettyName() const override;
QString prettyStatusMessage() const override;

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -39,9 +39,9 @@
using namespace std;
ofstream logfile;
static int s_threshold = -1;
QMutex s_mutex;
static ofstream logfile;
static unsigned int s_threshold = 0;
static QMutex s_mutex;
namespace Logger
{
@ -49,20 +49,22 @@ namespace Logger
static void
log( const char* msg, unsigned int debugLevel, bool toDisk = true )
{
if ( s_threshold < 0 )
if ( !s_threshold )
{
if ( qApp->arguments().contains( "--debug" ) ||
qApp->arguments().contains( "-d" ) )
s_threshold = LOGVERBOSE;
else
#ifdef QT_NO_DEBUG
#ifdef QT_NO_DEBUG
s_threshold = RELEASE_LEVEL_THRESHOLD;
#else
#else
s_threshold = DEBUG_LEVEL_THRESHOLD;
#endif
#endif
// Comparison is < threshold, below
++s_threshold;
}
if ( toDisk || (int)debugLevel <= s_threshold )
if ( toDisk || debugLevel < s_threshold )
{
QMutexLocker lock( &s_mutex );
@ -78,7 +80,7 @@ log( const char* msg, unsigned int debugLevel, bool toDisk = true )
logfile.flush();
}
if ( debugLevel <= LOGEXTRA || (int)debugLevel <= s_threshold )
if ( debugLevel <= LOGEXTRA || debugLevel < s_threshold )
{
QMutexLocker lock( &s_mutex );
@ -96,6 +98,8 @@ CalamaresLogHandler( QtMsgType type, const QMessageLogContext& context, const QS
{
static QMutex s_mutex;
Q_UNUSED( context );
QByteArray ba = msg.toUtf8();
const char* message = ba.constData();
@ -106,14 +110,12 @@ CalamaresLogHandler( QtMsgType type, const QMessageLogContext& context, const QS
log( message, LOGVERBOSE );
break;
case QtInfoMsg:
log( message, 1 );
break;
case QtCriticalMsg:
log( message, 0 );
break;
case QtWarningMsg:
log( message, 0 );
break;
case QtFatalMsg:
log( message, 0 );
break;

View File

@ -52,7 +52,7 @@ namespace Logger
virtual ~CDebug();
};
DLLEXPORT void CalamaresLogHandler( QtMsgType type, const char* msg );
DLLEXPORT void CalamaresLogHandler( QtMsgType type, const QMessageLogContext& context, const QString& msg );
DLLEXPORT void setupLogfile();
DLLEXPORT QString logFile();
}

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Based on KPluginFactory from KCoreAddons, KDE project
* Copyright 2007, Matthias Kretz <kretz@kde.org>
@ -26,7 +27,7 @@
#include <QObjectCleanupHandler>
#include <QDebug>
Q_GLOBAL_STATIC(QObjectCleanupHandler, factorycleanup)
Q_GLOBAL_STATIC( QObjectCleanupHandler, factorycleanup )
extern int kLibraryDebugArea();
@ -34,18 +35,18 @@ namespace Calamares
{
PluginFactory::PluginFactory()
: d_ptr(new PluginFactoryPrivate)
: d_ptr( new PluginFactoryPrivate )
{
Q_D(PluginFactory);
Q_D( PluginFactory );
d->q_ptr = this;
factorycleanup()->add(this);
factorycleanup()->add( this );
}
PluginFactory::PluginFactory(PluginFactoryPrivate &d)
: d_ptr(&d)
PluginFactory::PluginFactory( PluginFactoryPrivate& d )
: d_ptr( &d )
{
factorycleanup()->add(this);
factorycleanup()->add( this );
}
PluginFactory::~PluginFactory()
@ -53,70 +54,77 @@ PluginFactory::~PluginFactory()
delete d_ptr;
}
void PluginFactory::doRegisterPlugin(const QString &keyword, const QMetaObject *metaObject, CreateInstanceFunction instanceFunction)
void PluginFactory::doRegisterPlugin( const QString& keyword, const QMetaObject* metaObject, CreateInstanceFunction instanceFunction )
{
Q_D(PluginFactory);
Q_D( PluginFactory );
Q_ASSERT(metaObject);
Q_ASSERT( metaObject );
// we allow different interfaces to be registered without keyword
if (!keyword.isEmpty()) {
if (d->createInstanceHash.contains(keyword)) {
if ( !keyword.isEmpty() )
{
if ( d->createInstanceHash.contains( keyword ) )
qWarning() << "A plugin with the keyword" << keyword << "was already registered. A keyword must be unique!";
}
d->createInstanceHash.insert(keyword, PluginFactoryPrivate::Plugin(metaObject, instanceFunction));
} else {
const QList<PluginFactoryPrivate::Plugin> clashes(d->createInstanceHash.values(keyword));
const QMetaObject *superClass = metaObject->superClass();
if (superClass) {
for (const PluginFactoryPrivate::Plugin &plugin : clashes) {
for (const QMetaObject *otherSuper = plugin.first->superClass(); otherSuper;
otherSuper = otherSuper->superClass()) {
if (superClass == otherSuper) {
d->createInstanceHash.insert( keyword, PluginFactoryPrivate::Plugin( metaObject, instanceFunction ) );
}
else
{
const QList<PluginFactoryPrivate::Plugin> clashes( d->createInstanceHash.values( keyword ) );
const QMetaObject* superClass = metaObject->superClass();
if ( superClass )
{
for ( const PluginFactoryPrivate::Plugin& plugin : clashes )
{
for ( const QMetaObject* otherSuper = plugin.first->superClass(); otherSuper;
otherSuper = otherSuper->superClass() )
{
if ( superClass == otherSuper )
qWarning() << "Two plugins with the same interface(" << superClass->className() << ") were registered. Use keywords to identify the plugins.";
}
}
}
}
for (const PluginFactoryPrivate::Plugin &plugin : clashes) {
for ( const PluginFactoryPrivate::Plugin& plugin : clashes )
{
superClass = plugin.first->superClass();
if (superClass) {
for (const QMetaObject *otherSuper = metaObject->superClass(); otherSuper;
otherSuper = otherSuper->superClass()) {
if (superClass == otherSuper) {
if ( superClass )
{
for ( const QMetaObject* otherSuper = metaObject->superClass(); otherSuper;
otherSuper = otherSuper->superClass() )
{
if ( superClass == otherSuper )
qWarning() << "Two plugins with the same interface(" << superClass->className() << ") were registered. Use keywords to identify the plugins.";
}
}
}
}
d->createInstanceHash.insertMulti(keyword, PluginFactoryPrivate::Plugin(metaObject, instanceFunction));
d->createInstanceHash.insertMulti( keyword, PluginFactoryPrivate::Plugin( metaObject, instanceFunction ) );
}
}
QObject *PluginFactory::create(const char *iface, QWidget *parentWidget, QObject *parent, const QString &keyword)
QObject* PluginFactory::create( const char* iface, QWidget* parentWidget, QObject* parent, const QString& keyword )
{
Q_D(PluginFactory);
Q_D( PluginFactory );
QObject *obj = 0;
QObject* obj = nullptr;
const QList<PluginFactoryPrivate::Plugin> candidates(d->createInstanceHash.values(keyword));
const QList<PluginFactoryPrivate::Plugin> candidates( d->createInstanceHash.values( keyword ) );
// for !keyword.isEmpty() candidates.count() is 0 or 1
for (const PluginFactoryPrivate::Plugin &plugin : candidates) {
for (const QMetaObject *current = plugin.first; current; current = current->superClass()) {
if (0 == qstrcmp(iface, current->className())) {
if (obj) {
for ( const PluginFactoryPrivate::Plugin& plugin : candidates )
{
for ( const QMetaObject* current = plugin.first; current; current = current->superClass() )
{
if ( 0 == qstrcmp( iface, current->className() ) )
{
if ( obj )
qWarning() << "ambiguous interface requested from a DSO containing more than one plugin";
}
obj = plugin.second(parentWidget, parent);
obj = plugin.second( parentWidget, parent );
break;
}
}
}
if (obj) {
emit objectCreated(obj);
}
if ( obj )
emit objectCreated( obj );
return obj;
}

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Based on KPluginFactory from KCoreAddons, KDE project
* Copyright 2007, Matthias Kretz <kretz@kde.org>
@ -199,7 +200,7 @@ namespace Calamares
class DLLEXPORT PluginFactory : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(PluginFactory)
Q_DECLARE_PRIVATE( PluginFactory )
public:
/**
* This constructor creates a factory for a plugin.
@ -222,7 +223,7 @@ public:
* \returns A pointer to the created object is returned, or 0 if an error occurred.
*/
template<typename T>
T *create(QObject *parent = 0);
T* create( QObject* parent = nullptr );
/**
* Use this method to create an object. It will try to create an object which inherits
@ -235,34 +236,35 @@ public:
* \returns A pointer to the created object is returned, or 0 if an error occurred.
*/
template<typename T>
T *create(const QString &keyword, QObject *parent = 0);
T* create( const QString& keyword, QObject* parent = nullptr );
Q_SIGNALS:
void objectCreated(QObject *object);
void objectCreated( QObject* object );
protected:
/**
* Function pointer type to a function that instantiates a plugin.
*/
typedef QObject *(*CreateInstanceFunction)(QWidget *, QObject *);
typedef QObject* ( *CreateInstanceFunction )( QWidget*, QObject* );
/**
* This is used to detect the arguments need for the constructor of plugin classes.
* You can inherit it, if you want to add new classes and still keep support for the old ones.
*/
template<class impl>
struct InheritanceChecker {
CreateInstanceFunction createInstanceFunction(QWidget *)
struct InheritanceChecker
{
CreateInstanceFunction createInstanceFunction( QWidget* )
{
return &createInstance<impl, QWidget>;
}
CreateInstanceFunction createInstanceFunction(...)
CreateInstanceFunction createInstanceFunction( ... )
{
return &createInstance<impl, QObject>;
}
};
explicit PluginFactory(PluginFactoryPrivate &dd);
explicit PluginFactory( PluginFactoryPrivate& dd );
/**
* Registers a plugin with the factory. Call this function from the constructor of the
@ -292,14 +294,14 @@ protected:
* \endcode
*/
template<class T>
void registerPlugin(const QString &keyword = QString(),
CreateInstanceFunction instanceFunction
= InheritanceChecker<T>().createInstanceFunction(reinterpret_cast<T *>(0)))
void registerPlugin( const QString& keyword = QString(),
CreateInstanceFunction instanceFunction
= InheritanceChecker<T>().createInstanceFunction( reinterpret_cast<T*>( 0 ) ) )
{
doRegisterPlugin(keyword, &T::staticMetaObject, instanceFunction);
doRegisterPlugin( keyword, &T::staticMetaObject, instanceFunction );
}
PluginFactoryPrivate *const d_ptr;
PluginFactoryPrivate* const d_ptr;
/**
* This function is called when the factory asked to create an Object.
@ -314,56 +316,55 @@ protected:
* \param keyword A string that uniquely identifies the plugin. If a KService is used this
* keyword is read from the X-KDE-PluginKeyword entry in the .desktop file.
*/
virtual QObject *create(const char *iface, QWidget *parentWidget, QObject *parent, const QString &keyword);
virtual QObject* create( const char* iface, QWidget* parentWidget, QObject* parent, const QString& keyword );
template<class impl, class ParentType>
static QObject *createInstance(QWidget *parentWidget, QObject *parent)
static QObject* createInstance( QWidget* parentWidget, QObject* parent )
{
Q_UNUSED(parentWidget);
ParentType *p = 0;
if (parent) {
p = qobject_cast<ParentType *>(parent);
Q_ASSERT(p);
Q_UNUSED( parentWidget );
ParentType* p = nullptr;
if ( parent )
{
p = qobject_cast<ParentType*>( parent );
Q_ASSERT( p );
}
return new impl(p);
return new impl( p );
}
private:
void doRegisterPlugin(const QString &keyword, const QMetaObject *metaObject, CreateInstanceFunction instanceFunction);
void doRegisterPlugin( const QString& keyword, const QMetaObject* metaObject, CreateInstanceFunction instanceFunction );
};
template<typename T>
inline T *PluginFactory::create(QObject *parent)
inline T* PluginFactory::create( QObject* parent )
{
QObject *o = create(T::staticMetaObject.className(),
parent && parent->isWidgetType() ? reinterpret_cast<QWidget *>(parent) : 0,
parent,
QString());
QObject* o = create( T::staticMetaObject.className(),
parent && parent->isWidgetType() ? reinterpret_cast<QWidget*>( parent ) : nullptr,
parent,
QString() );
T *t = qobject_cast<T *>(o);
if (!t) {
T* t = qobject_cast<T*>( o );
if ( !t )
delete o;
}
return t;
}
template<typename T>
inline T *PluginFactory::create(const QString &keyword, QObject *parent)
inline T* PluginFactory::create( const QString& keyword, QObject* parent )
{
QObject *o = create(T::staticMetaObject.className(),
parent && parent->isWidgetType() ? reinterpret_cast<QWidget *>(parent) : 0,
parent,
keyword);
QObject* o = create( T::staticMetaObject.className(),
parent && parent->isWidgetType() ? reinterpret_cast<QWidget*>( parent ) : nullptr,
parent,
keyword );
T *t = qobject_cast<T *>(o);
if (!t) {
T* t = qobject_cast<T*>( o );
if ( !t )
delete o;
}
return t;
}
}
Q_DECLARE_INTERFACE(Calamares::PluginFactory, CalamaresPluginFactory_iid)
Q_DECLARE_INTERFACE( Calamares::PluginFactory, CalamaresPluginFactory_iid )
#endif // CALAMARESPLUGINFACTORY_H

View File

@ -0,0 +1,65 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Calamares is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LIBCALAMARES_UTILS_UNITS_H
#define LIBCALAMARES_UTILS_UNITS_H
#include <QtCore/QIntegerForSize>
namespace CalamaresUtils
{
/** User defined literals, 1_MiB is 1 MibiByte (= 2^20 bytes) */
constexpr qint64 operator ""_MiB( unsigned long long m )
{
return qint64(m) * 1024 * 1024;
}
/** User defined literals, 1_GiB is 1 GibiByte (= 2^30 bytes) */
constexpr qint64 operator ""_GiB( unsigned long long m )
{
return operator ""_MiB(m) * 1024;
}
constexpr qint64 MiBtoBytes( unsigned long long m )
{
return operator ""_MiB( m );
}
constexpr qint64 GiBtoBytes( unsigned long long m )
{
return operator ""_GiB( m );
}
constexpr qint64 MiBToBytes( double m )
{
return qint64(m * 1024 * 1024);
}
constexpr qint64 GiBtoBytes( double m )
{
return qint64(m * 1024 * 1024 * 1024);
}
constexpr int BytesToMiB( qint64 b )
{
return int( b / 1024 / 1024 );
}
} // namespace
#endif

View File

@ -1,6 +1,6 @@
set( CALAMARESUI_LIBRARY_TARGET calamaresui )
project( libcalamaresui CXX )
list( APPEND ${CALAMARESUI_LIBRARY_TARGET}_SOURCES
set( calamaresui_SOURCES
modulesystem/CppJobModule.cpp
modulesystem/Module.cpp
modulesystem/ModuleManager.cpp
@ -29,12 +29,20 @@ list( APPEND ${CALAMARESUI_LIBRARY_TARGET}_SOURCES
ViewManager.cpp
)
list( APPEND ${CALAMARESUI_LIBRARY_TARGET}_UI
# Don't warn about third-party sources
mark_thirdparty_code(
utils/ImageRegistry.cpp
utils/qjsonitem.cpp
utils/qjsonmodel.cpp
widgets/waitingspinnerwidget.cpp
)
set( calamaresui_UI
utils/DebugWindow.ui
)
if( WITH_PYTHON )
list( APPEND ${CALAMARESUI_LIBRARY_TARGET}_SOURCES
list( APPEND calamaresui_SOURCES
modulesystem/PythonJobModule.cpp
)
endif()
@ -43,7 +51,7 @@ if( WITH_PYTHONQT )
include_directories(${PYTHON_INCLUDE_DIRS})
include_directories(${PYTHONQT_INCLUDE_DIR})
list( APPEND ${CALAMARESUI_LIBRARY_TARGET}_SOURCES
list( APPEND calamaresui_SOURCES
modulesystem/PythonQtViewModule.cpp
utils/PythonQtUtils.cpp
viewpages/PythonQtJob.cpp
@ -58,12 +66,12 @@ if( WITH_PYTHONQT )
)
endif()
calamares_add_library( ${CALAMARESUI_LIBRARY_TARGET}
SOURCES ${${CALAMARESUI_LIBRARY_TARGET}_SOURCES}
UI ${${CALAMARESUI_LIBRARY_TARGET}_UI}
calamares_add_library( calamaresui
SOURCES ${calamaresui_SOURCES}
UI ${calamaresui_UI}
EXPORT_MACRO UIDLLEXPORT_PRO
LINK_PRIVATE_LIBRARIES
yaml-cpp
${YAMLCPP_LIBRARY}
Qt5::Svg
Qt5::QuickWidgets
${OPTIONAL_PRIVATE_LIBRARIES}

View File

@ -165,7 +165,7 @@ ExecutionViewStep::appendJobModuleInstanceKey( const QString& instanceKey )
void
ExecutionViewStep::updateFromJobQueue( qreal percent, const QString& message )
{
m_progressBar->setValue( percent * m_progressBar->maximum() );
m_progressBar->setValue( int( percent * m_progressBar->maximum() ) );
m_label->setText( message );
}

View File

@ -2,6 +2,7 @@
*
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
* Copyright 2016, Kevin Kofler <kevin.kofler@chello.at>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -25,7 +26,8 @@
class QPluginLoader;
namespace Calamares {
namespace Calamares
{
class UIDLLEXPORT CppJobModule : public Module
{
@ -42,7 +44,7 @@ protected:
private:
friend class Module; //so only the superclass can instantiate
explicit CppJobModule();
virtual ~CppJobModule();
virtual ~CppJobModule() override;
QPluginLoader* m_loader;
job_ptr m_job;

View File

@ -100,9 +100,9 @@ public:
/**
* @brief instanceKey returns the instance key of this module.
* @return a string with the instance key.
* A module instance's instance key is modulename@instanceid.
* @example "partition@partition" (default configuration) or
* "locale@someconfig" (custom configuration)
* A module instance's instance key is modulename\@instanceid.
* For instance, "partition\@partition" (default configuration) or
* "locale\@someconfig" (custom configuration)
*/
virtual QString instanceKey() const final;

View File

@ -219,14 +219,14 @@ ModuleManager::loadModules()
}
auto findCustomInstance =
[ customInstances ]( const QString& moduleName,
const QString& instanceId ) -> int
[ customInstances ]( const QString& module,
const QString& id) -> int
{
for ( int i = 0; i < customInstances.count(); ++i )
{
auto thisInstance = customInstances[ i ];
if ( thisInstance.value( "module" ) == moduleName &&
thisInstance.value( "id" ) == instanceId )
if ( thisInstance.value( "module" ) == module &&
thisInstance.value( "id" ) == id )
return i;
}
return -1;

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,7 +24,8 @@
#include "UiDllMacro.h"
namespace Calamares {
namespace Calamares
{
class UIDLLEXPORT ProcessJobModule : public Module
{
@ -40,7 +42,7 @@ protected:
private:
friend class Module;
explicit ProcessJobModule();
virtual ~ProcessJobModule();
virtual ~ProcessJobModule() override;
QString m_command;
QString m_workingPath;

View File

@ -40,7 +40,7 @@ protected:
private:
friend class Module;
explicit PythonJobModule();
virtual ~PythonJobModule();
virtual ~PythonJobModule() override;
QString m_scriptFileName;
QString m_workingPath;

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,7 +25,8 @@
class QPluginLoader;
namespace Calamares {
namespace Calamares
{
class ViewStep;
@ -43,7 +45,7 @@ protected:
private:
friend class Module; //so only the superclass can instantiate
explicit ViewModule();
virtual ~ViewModule();
virtual ~ViewModule() override;
QPluginLoader* m_loader;
ViewStep* m_viewStep = nullptr;

View File

@ -1,31 +1,31 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
*
* Originally from Tomahawk,
* Copyright 2012, Christian Muehlhaeuser <muesli@tomahawk-player.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Calamares is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
* SPDX-License-Identifier: GPLv3+
* License-Filename: LICENSES/GPLv3+-ImageRegistry
*/
/*
* Copyright 2012, Christian Muehlhaeuser <muesli@tomahawk-player.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ImageRegistry.h"
#include <QSvgRenderer>
#include <QPainter>
#include <QIcon>
#include "utils/Logger.h"
#include <qicon.h>
static QHash< QString, QHash< int, QHash< qint64, QPixmap > > > s_cache;
ImageRegistry* ImageRegistry::s_instance = 0;
@ -61,6 +61,12 @@ ImageRegistry::cacheKey( const QSize& size, float opacity, QColor tint )
QPixmap
ImageRegistry::pixmap( const QString& image, const QSize& size, CalamaresUtils::ImageMode mode, float opacity, QColor tint )
{
if ( size.width() < 0 || size.height() < 0 )
{
Q_ASSERT( false );
return QPixmap();
}
QHash< qint64, QPixmap > subsubcache;
QHash< int, QHash< qint64, QPixmap > > subcache;
@ -82,11 +88,10 @@ ImageRegistry::pixmap( const QString& image, const QSize& size, CalamaresUtils::
// Image not found in cache. Let's load it.
QPixmap pixmap;
if ( image.toLower().endsWith( ".svg" ) ||
image.toLower().endsWith( ".svgz" ) )
if ( image.toLower().endsWith( ".svg" ) )
{
QSvgRenderer svgRenderer( image );
QPixmap p( size.isNull() ? svgRenderer.defaultSize() : size );
QPixmap p( size.isNull() || size.height() == 0 || size.width() == 0 ? svgRenderer.defaultSize() : size );
p.fill( Qt::transparent );
QPainter pixPainter( &p );
@ -105,7 +110,7 @@ ImageRegistry::pixmap( const QString& image, const QSize& size, CalamaresUtils::
resultImage.setAlphaChannel( p.toImage().alphaChannel() );
p = QPixmap::fromImage( resultImage );
}
}
pixmap = p;
}
@ -125,7 +130,18 @@ ImageRegistry::pixmap( const QString& image, const QSize& size, CalamaresUtils::
}
if ( !size.isNull() && pixmap.size() != size )
pixmap = pixmap.scaled( size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation );
{
if ( size.width() == 0 )
{
pixmap = pixmap.scaledToHeight( size.height(), Qt::SmoothTransformation );
}
else if ( size.height() == 0 )
{
pixmap = pixmap.scaledToWidth( size.width(), Qt::SmoothTransformation );
}
else
pixmap = pixmap.scaled( size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation );
}
putInCache( image, size, mode, opacity, pixmap, tint );
}
@ -137,8 +153,6 @@ ImageRegistry::pixmap( const QString& image, const QSize& size, CalamaresUtils::
void
ImageRegistry::putInCache( const QString& image, const QSize& size, CalamaresUtils::ImageMode mode, float opacity, const QPixmap& pixmap, QColor tint )
{
// cDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Adding to image cache:" << image << size << mode;
QHash< qint64, QPixmap > subsubcache;
QHash< int, QHash< qint64, QPixmap > > subcache;

View File

@ -1,24 +1,26 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
*
* Originally from Tomahawk,
* Copyright 2012, Christian Muehlhaeuser <muesli@tomahawk-player.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Calamares is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
* SPDX-License-Identifier: GPLv3+
* License-Filename: LICENSES/GPLv3+-ImageRegistry
*/
/*
* Copyright 2012, Christian Muehlhaeuser <muesli@tomahawk-player.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IMAGE_REGISTRY_H
#define IMAGE_REGISTRY_H

View File

@ -1,27 +1,31 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
* Originally from QJsonModel <https://github.com/dridk/QJsonmodel>
* Copyright 2015, Sacha Schutz <sacha@labsquare.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Calamares is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
* SPDX-License-Identifier: GPL-3.0+
* License-Filename: LICENSES/GPLv3+-QJsonModel
*/
/***********************************************
Copyright (C) 2014 Schutz Sacha
This file is part of QJsonModel (https://github.com/dridk/QJsonmodel).
QJsonModel is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QJsonModel is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QJsonModel. If not, see <http://www.gnu.org/licenses/>.
**********************************************/
#include "qjsonitem.h"
QJsonTreeItem::QJsonTreeItem(QJsonTreeItem *parent)
: mType( QJsonValue::Null )
{
mParent = parent;
@ -104,8 +108,7 @@ QJsonTreeItem* QJsonTreeItem::load(const QJsonValue& value, QJsonTreeItem* paren
{
//Get all QJsonValue childs
const auto keys = value.toObject().keys();
for (const QString &key : keys){
foreach (QString key , value.toObject().keys()){
QJsonValue v = value.toObject().value(key);
QJsonTreeItem * child = load(v,rootItem);
child->setKey(key);
@ -120,8 +123,7 @@ QJsonTreeItem* QJsonTreeItem::load(const QJsonValue& value, QJsonTreeItem* paren
{
//Get all QJsonValue childs
int index = 0;
const auto valueArray = value.toArray();
for (const QJsonValue &v : valueArray) {
foreach (QJsonValue v , value.toArray()){
QJsonTreeItem * child = load(v,rootItem);
child->setKey(QString::number(index));

View File

@ -1,20 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
* Originally from QJsonModel <https://github.com/dridk/QJsonmodel>
* Copyright 2015, Sacha Schutz <sacha@labsquare.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Calamares is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
* SPDX-License-Identifier: GPL-3.0+
* License-Filename: LICENSES/GPLv3+-QJsonModel
*/
#ifndef JSONITEM_H
@ -27,7 +14,7 @@ class QJsonTreeItem
{
public:
QJsonTreeItem(QJsonTreeItem * parent = 0);
virtual ~QJsonTreeItem();
~QJsonTreeItem();
void appendChild(QJsonTreeItem * item);
QJsonTreeItem *child(int row);
QJsonTreeItem *parent();

View File

@ -1,22 +1,27 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
* Originally from QJsonModel <https://github.com/dridk/QJsonmodel>
* Copyright 2015, Sacha Schutz <sacha@labsquare.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Calamares is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
* SPDX-License-Identifier: GPL-3.0+
* License-Filename: LICENSES/GPLv3+-QJsonModel
*/
/***********************************************
Copyright (C) 2014 Schutz Sacha
This file is part of QJsonModel (https://github.com/dridk/QJsonmodel).
QJsonModel is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QJsonModel is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QJsonModel. If not, see <http://www.gnu.org/licenses/>.
**********************************************/
#include "qjsonmodel.h"
#include <QFile>
@ -36,13 +41,6 @@ QJsonModel::QJsonModel(QObject *parent) :
}
QJsonModel::~QJsonModel()
{
delete mRootItem;
}
bool QJsonModel::load(const QString &fileName)
{
QFile file(fileName);
@ -68,7 +66,11 @@ bool QJsonModel::loadJson(const QByteArray &json)
if (!mDocument.isNull())
{
beginResetModel();
mRootItem = QJsonTreeItem::load(QJsonValue(mDocument.object()));
if (mDocument.isArray()) {
mRootItem = QJsonTreeItem::load(QJsonValue(mDocument.array()));
} else {
mRootItem = QJsonTreeItem::load(QJsonValue(mDocument.object()));
}
endResetModel();
return true;
}

View File

@ -1,23 +1,9 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
* Originally from QJsonModel <https://github.com/dridk/QJsonmodel>
* Copyright 2015, Sacha Schutz <sacha@labsquare.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Calamares is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
* SPDX-License-Identifier: GPL-3.0+
* License-Filename: LICENSES/GPLv3+-QJsonModel
*/
#ifndef QJSONMODEL_H
#define QJSONMODEL_H
@ -31,7 +17,6 @@ class QJsonModel : public QAbstractItemModel
Q_OBJECT
public:
explicit QJsonModel(QObject *parent = 0);
virtual ~QJsonModel();
bool load(const QString& fileName);
bool load(QIODevice * device);
bool loadJson(const QByteArray& json);

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -61,6 +62,8 @@ ViewStep::setModuleInstanceKey( const QString& instanceKey )
void
ViewStep::setConfigurationMap( const QVariantMap& configurationMap )
{}
{
Q_UNUSED( configurationMap );
}
}

View File

@ -45,7 +45,7 @@ class UIDLLEXPORT ViewStep : public QObject
Q_OBJECT
public:
explicit ViewStep( QObject* parent = nullptr );
virtual ~ViewStep();
virtual ~ViewStep() override;
virtual QString prettyName() const = 0;

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -28,14 +29,14 @@ class ClickableLabel : public QLabel
public:
explicit ClickableLabel( QWidget* parent = nullptr, Qt::WindowFlags f = 0 );
explicit ClickableLabel( const QString& text, QWidget* parent = nullptr, Qt::WindowFlags f = 0 );
virtual ~ClickableLabel();
virtual ~ClickableLabel() override;
signals:
void clicked();
protected:
virtual void mousePressEvent( QMouseEvent* event );
virtual void mouseReleaseEvent( QMouseEvent* event );
virtual void mousePressEvent( QMouseEvent* event ) override;
virtual void mouseReleaseEvent( QMouseEvent* event ) override;
private:
QTime m_time;

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -42,6 +43,7 @@ FixedAspectRatioLabel::setPixmap( const QPixmap& pixmap )
void
FixedAspectRatioLabel::resizeEvent( QResizeEvent* event )
{
Q_UNUSED( event );
QLabel::setPixmap( m_pixmap.scaled(
contentsRect().size(),
Qt::KeepAspectRatio,

View File

@ -28,7 +28,7 @@ class FixedAspectRatioLabel : public QLabel
Q_OBJECT
public:
explicit FixedAspectRatioLabel( QWidget* parent = nullptr );
virtual ~FixedAspectRatioLabel();
virtual ~FixedAspectRatioLabel() override;
public slots:
void setPixmap( const QPixmap &pixmap );

View File

@ -8,6 +8,7 @@
# Copyright 2014, Kevin Kofler <kevin.kofler@chello.at>
# Copyright 2017, Alf Gaida <agaida@siduction.org>
# Copyright 2017, Bernhard Landauer <oberon@manjaro.org>
# Copyright 2017, Adriaan de Groot <groot@kde.org>
#
# Calamares is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -486,8 +487,8 @@ def run():
if (os.path.exists(greeter_path)):
# configure first found lightdm-greeter
for entry in os.listdir(greeter_path):
if entry.name.endswith('.desktop'):
greeter = entry.name.split('.')[0]
if entry.endswith('.desktop'):
greeter = entry.split('.')[0]
libcalamares.utils.debug(
"found greeter {!s}".format(greeter)
)

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2016, Kevin Kofler <kevin.kofler@chello.at>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -34,7 +35,7 @@ class PLUGINDLLEXPORT DracutLuksCfgJob : public Calamares::CppJob
public:
explicit DracutLuksCfgJob( QObject* parent = nullptr );
virtual ~DracutLuksCfgJob();
virtual ~DracutLuksCfgJob() override;
QString prettyName() const override;

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2016, Kevin Kofler <kevin.kofler@chello.at>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -34,7 +35,7 @@ class PLUGINDLLEXPORT DummyCppJob : public Calamares::CppJob
public:
explicit DummyCppJob( QObject* parent = nullptr );
virtual ~DummyCppJob();
virtual ~DummyCppJob() override;
QString prettyName() const override;

View File

@ -50,11 +50,11 @@ FinishedPage::FinishedPage( QWidget* parent )
CALAMARES_RETRANSLATE(
ui->retranslateUi( this );
ui->mainText->setText( tr( "<h1>All done.</h1><br/>"
"%1 has been installed on your computer.<br/>"
"You may now restart into your new system, or continue "
"using the %2 Live environment." )
.arg( *Calamares::Branding::VersionedName )
.arg( *Calamares::Branding::ProductName ) );
"%1 has been installed on your computer.<br/>"
"You may now restart into your new system, or continue "
"using the %2 Live environment." )
.arg( *Calamares::Branding::VersionedName )
.arg( *Calamares::Branding::ProductName ) );
)
}
@ -90,7 +90,7 @@ FinishedPage::setUpRestart()
this, [this]
{
if ( ui->restartCheckBox->isVisible() &&
ui->restartCheckBox->isChecked() )
ui->restartCheckBox->isChecked() )
QProcess::execute( "/bin/sh", { "-c", m_restartNowCommand } );
} );
}
@ -108,9 +108,9 @@ FinishedPage::onInstallationFailed( const QString& message, const QString& detai
{
Q_UNUSED( details );
ui->mainText->setText( tr( "<h1>Installation Failed</h1><br/>"
"%1 has not been installed on your computer.<br/>"
"The error message was: %2." )
.arg( *Calamares::Branding::VersionedName )
.arg( message ) );
"%1 has not been installed on your computer.<br/>"
"The error message was: %2." )
.arg( *Calamares::Branding::VersionedName )
.arg( message ) );
setRestartNowEnabled( false );
}

View File

@ -34,6 +34,7 @@ FinishedViewStep::FinishedViewStep( QObject* parent )
: Calamares::ViewStep( parent )
, m_widget( new FinishedPage() )
, installFailed( false )
, m_notifyOnFinished( false )
{
auto jq = Calamares::JobQueue::instance();
connect( jq, &Calamares::JobQueue::failed,
@ -110,7 +111,7 @@ FinishedViewStep::sendNotification()
{
// If the installation failed, don't send notification popup;
// there's a (modal) dialog popped up with the failure notice.
if (installFailed)
if ( installFailed )
return;
QDBusInterface notify( "org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications" );
@ -139,7 +140,8 @@ FinishedViewStep::onActivate()
{
m_widget->setUpRestart();
sendNotification();
if ( m_notifyOnFinished )
sendNotification();
}
@ -152,8 +154,8 @@ FinishedViewStep::jobs() const
void
FinishedViewStep::onInstallationFailed( const QString& message, const QString& details )
{
Q_UNUSED(message);
Q_UNUSED(details);
Q_UNUSED( message );
Q_UNUSED( details );
installFailed = true;
}
@ -179,6 +181,9 @@ FinishedViewStep::setConfigurationMap( const QVariantMap& configurationMap )
m_widget->setRestartNowCommand( "systemctl -i reboot" );
}
}
if ( configurationMap.contains( "notifyOnFinished" ) &&
configurationMap.value( "notifyOnFinished" ).type() == QVariant::Bool )
m_notifyOnFinished = configurationMap.value( "notifyOnFinished" ).toBool();
}
CALAMARES_PLUGIN_FACTORY_DEFINITION( FinishedViewStepFactory, registerPlugin<FinishedViewStep>(); )

View File

@ -34,7 +34,7 @@ class PLUGINDLLEXPORT FinishedViewStep : public Calamares::ViewStep
public:
explicit FinishedViewStep( QObject* parent = nullptr );
virtual ~FinishedViewStep();
virtual ~FinishedViewStep() override;
QString prettyName() const override;
@ -68,6 +68,7 @@ private:
void sendNotification();
bool installFailed;
bool m_notifyOnFinished;
};
CALAMARES_PLUGIN_FACTORY_DECLARATION( FinishedViewStepFactory )

View File

@ -1,4 +1,17 @@
Configuration for the "finished" page, which is usually shown only at
the end of the installation (successful or not).
---
# The finished page can hold a "restart system now" checkbox.
# If this is false, no checkbox is show and the system is not restarted
# when Calamares exits.
restartNowEnabled: true
# Initial state of the checkbox "restart now".
restartNowChecked: false
# If the checkbox is shown, and the checkbox is checked, then when
# Calamares exits from the finished-page it will run this command.
restartNowCommand: "systemctl -i reboot"
# When the last page is (successfully) reached, send a DBus notification
# to the desktop that the installation is done. This works only if the
# user as whom Calamares is run, can reach the regular desktop session bus.
notifyOnFinished: false

View File

@ -234,6 +234,8 @@ class FstabGenerator(object):
if not mount_point and not filesystem == "swap":
return None
if not mount_point:
mount_point = "swap"
options = self.mount_options.get(filesystem,
self.mount_options["default"])
@ -283,12 +285,14 @@ class FstabGenerator(object):
check=check,
)
else:
return dict(device="UUID=" + partition["uuid"],
mount_point=mount_point or "swap",
fs=filesystem,
options=options,
check=check,
)
device="UUID=" + partition["uuid"]
return dict(device=device,
mount_point=mount_point,
fs=filesystem,
options=options,
check=check,
)
def print_fstab_line(self, dct, file=None):
""" Prints line to '/etc/fstab' file. """

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -34,7 +35,7 @@ class PLUGINDLLEXPORT InteractiveTerminalViewStep : public Calamares::ViewStep
public:
explicit InteractiveTerminalViewStep( QObject* parent = nullptr );
virtual ~InteractiveTerminalViewStep();
virtual ~InteractiveTerminalViewStep() override;
QString prettyName() const override;

View File

@ -37,6 +37,18 @@
#include <QProcess>
#include <QPushButton>
class LayoutItem : public QListWidgetItem
{
public:
QString data;
virtual ~LayoutItem();
};
LayoutItem::~LayoutItem()
{
}
static QPersistentModelIndex
findLayout( const KeyboardLayoutModel* klm, const QString& currentLayout )
{
@ -54,7 +66,7 @@ findLayout( const KeyboardLayoutModel* klm, const QString& currentLayout )
}
KeyboardPage::KeyboardPage( QWidget* parent )
: QWidget()
: QWidget( parent )
, ui( new Ui::Page_Keyboard )
, m_keyboardPreview( new KeyBoardPreview( this ) )
, m_defaultIndex( 0 )
@ -369,6 +381,8 @@ static inline QStringList xkbmap_args( QStringList&& r, const QString& layout, c
void
KeyboardPage::onListVariantCurrentItemChanged( QListWidgetItem* current, QListWidgetItem* previous )
{
Q_UNUSED( previous );
QPersistentModelIndex layoutIndex = ui->listLayout->currentIndex();
LayoutItem* variantItem = dynamic_cast< LayoutItem* >( current );

View File

@ -134,9 +134,6 @@ KeyboardViewStep::onLeave()
void
KeyboardViewStep::setConfigurationMap( const QVariantMap& configurationMap )
{
// Save the settings to the global settings for the SetKeyboardLayoutJob to use
Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
if ( configurationMap.contains( "xOrgConfFileName" ) &&
configurationMap.value( "xOrgConfFileName" ).type() == QVariant::String &&
!configurationMap.value( "xOrgConfFileName" ).toString().isEmpty() )

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -34,7 +35,7 @@ class PLUGINDLLEXPORT KeyboardViewStep : public Calamares::ViewStep
public:
explicit KeyboardViewStep( QObject* parent = nullptr );
virtual ~KeyboardViewStep();
virtual ~KeyboardViewStep() override;
QString prettyName() const override;
QString prettyStatus() const override;

View File

@ -36,7 +36,7 @@ class PLUGINDLLEXPORT LicenseViewStep : public Calamares::ViewStep
public:
explicit LicenseViewStep( QObject* parent = nullptr );
virtual ~LicenseViewStep();
virtual ~LicenseViewStep() override;
QString prettyName() const override;
@ -52,7 +52,7 @@ public:
bool isAtEnd() const override;
QList< Calamares::job_ptr > jobs() const override;
void setConfigurationMap( const QVariantMap& configurationMap ) override;
private:

View File

@ -17,6 +17,6 @@ calamares_add_plugin( locale
LINK_PRIVATE_LIBRARIES
calamaresui
Qt5::Network
yaml-cpp
${YAMLCPP_LIBRARY}
SHARED_LIB
)

View File

@ -132,12 +132,12 @@ LocaleViewStep::fetchGeoIpTimezone()
!map.value( "time_zone" ).toString().isEmpty() )
{
QString timezoneString = map.value( "time_zone" ).toString();
QStringList timezone = timezoneString.split( '/', QString::SkipEmptyParts );
if ( timezone.size() >= 2 )
QStringList tzParts = timezoneString.split( '/', QString::SkipEmptyParts );
if ( tzParts.size() >= 2 )
{
cDebug() << "GeoIP reporting" << timezoneString;
QString region = timezone.takeFirst();
QString zone = timezone.join( '/' );
QString region = tzParts.takeFirst();
QString zone = tzParts.join( '/' );
m_startingTimezone = qMakePair( region, zone );
}
}

View File

@ -37,7 +37,7 @@ class PLUGINDLLEXPORT LocaleViewStep : public Calamares::ViewStep
public:
explicit LocaleViewStep( QObject* parent = nullptr );
virtual ~LocaleViewStep();
virtual ~LocaleViewStep() override;
QString prettyName() const override;
QString prettyStatus() const override;

View File

@ -15,6 +15,6 @@ calamares_add_plugin( netinstall
LINK_PRIVATE_LIBRARIES
calamaresui
Qt5::Network
yaml-cpp
${YAMLCPP_LIBRARY}
SHARED_LIB
)

View File

@ -1,6 +1,7 @@
/*
* Copyright 2016, Luca Giambonini <almack@chakraos.org>
* Copyright 2016, Lisa Vitolo <shainer@chakraos.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -34,7 +35,7 @@ class PLUGINDLLEXPORT NetInstallViewStep : public Calamares::ViewStep
public:
explicit NetInstallViewStep( QObject* parent = nullptr );
virtual ~NetInstallViewStep();
virtual ~NetInstallViewStep() override;
QString prettyName() const override;
QString prettyStatus() const override;

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright (c) 2017, Kyle Robbertze <kyle@aims.ac.za>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -126,6 +127,8 @@ bool
PackageModel::setHeaderData( int section, Qt::Orientation orientation,
const QVariant& value, int role )
{
Q_UNUSED( role );
if ( orientation == Qt::Horizontal )
{
if ( m_columnHeadings.value( section ) != QVariant() )

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright (c) 2017, Kyle Robbertze <kyle@aims.ac.za>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -35,14 +36,14 @@ class PackageModel : public QAbstractItemModel
Q_OBJECT
public:
explicit PackageModel( const YAML::Node& data, QObject* parent = 0 );
~PackageModel();
explicit PackageModel( const YAML::Node& data, QObject* parent = nullptr );
~PackageModel() override;
QVariant data( const QModelIndex& index, int role ) const override;
bool setData( const QModelIndex& index, const QVariant& value,
int role = Qt::EditRole ) override;
bool setHeaderData( int section, Qt::Orientation orientation,
const QVariant& value, int role = Qt::EditRole );
const QVariant& value, int role = Qt::EditRole ) override;
Qt::ItemFlags flags( const QModelIndex& index ) const override;
QVariant headerData( int section, Qt::Orientation orientation,
int role = Qt::DisplayRole ) const override;

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright (c) 2017, Kyle Robbertze <kyle@aims.ac.za>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -18,9 +19,9 @@
#include "PackageTreeItem.h"
PackageTreeItem::PackageTreeItem( const ItemData& data, PackageTreeItem* parent ) :
m_data( data ),
m_parentItem( parent )
PackageTreeItem::PackageTreeItem( const ItemData& data, PackageTreeItem* parent )
: m_parentItem( parent )
, m_data( data )
{ }
PackageTreeItem::PackageTreeItem( const QString packageName, PackageTreeItem* parent ) :

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright (c) 2017, Kyle Robbertze <kyle@aims.ac.za>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -37,10 +38,10 @@ public:
bool isHidden = false;
Qt::CheckState selected = Qt::Unchecked;
};
explicit PackageTreeItem( const ItemData& data, PackageTreeItem* parent = 0 );
explicit PackageTreeItem( const QString packageName, PackageTreeItem* parent = 0 );
explicit PackageTreeItem( PackageTreeItem* parent = 0 );
~PackageTreeItem();
explicit PackageTreeItem( const ItemData& data, PackageTreeItem* parent = nullptr );
explicit PackageTreeItem( const QString packageName, PackageTreeItem* parent = nullptr );
explicit PackageTreeItem( PackageTreeItem* parent = nullptr );
~PackageTreeItem() override;
void appendChild( PackageTreeItem* child );
PackageTreeItem* child( int row );

View File

@ -8,7 +8,7 @@ find_package( KF5 REQUIRED CoreAddons )
# These are needed because KPMcore links publicly against ConfigCore, I18n, IconThemes, KIOCore and Service
find_package( KF5 REQUIRED Config I18n IconThemes KIO Service )
find_package( KPMcore 3.1.50 )
find_package( KPMcore 3.1.50 QUIET )
if ( ${KPMcore_FOUND} )
add_definitions(-DWITH_KPMCORE22)
endif()

View File

@ -38,8 +38,8 @@ public:
IsPartitionRole
};
BootLoaderModel( QObject* parent = 0 );
~BootLoaderModel();
BootLoaderModel( QObject* parent = nullptr );
~BootLoaderModel() override;
/**
* Init the model with the list of devices. Does *not* take ownership of the

View File

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <http://github.com/calamares> ===
*
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -32,8 +33,8 @@ class DeviceModel : public QAbstractListModel
{
Q_OBJECT
public:
DeviceModel( QObject* parent = 0 );
~DeviceModel();
DeviceModel( QObject* parent = nullptr );
~DeviceModel() override;
/**
* Init the model with the list of devices. Does *not* take ownership of the

Some files were not shown because too many files have changed in this diff Show More