Compare commits

...

100 Commits

Author SHA1 Message Date
Heiko Becker fc385fd89c GIT_SILENT Update Appstream for new release
(cherry picked from commit e94edd9a375df79799e39cd73fe94ec488b12693)
2022-01-29 00:35:54 +01:00
l10n daemon script 66fa786e00 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-01-24 01:45:29 +00:00
Andrius Štikonas bb6cd82f6d Fix a comment. 2022-01-22 01:05:38 +00:00
Tomaz Canabrava 4f0ff7b63a Show devices dock panel when not passing --devices 2022-01-22 01:03:28 +00:00
Tomaz Canabrava 90f6cb74d2 Blocks the user to select a different device if --device is specified
So the user can't select a different device by mistake.
2022-01-22 01:03:28 +00:00
Andrius Štikonas 87eb4cdadd Remove unnecessary or non-existing Qt flags. 2022-01-21 00:29:51 +00:00
Andrius Štikonas d795c3d9f8 Set KDE_COMPILERSETTINGS_LEVEL to 5.85. 2022-01-20 22:25:40 +00:00
Andrius Štikonas 3b290d606d Revert "Disable Qt6 CI due to KPMcore dependency problem."
This reverts commit 48c5f67506.
2022-01-20 19:18:08 +00:00
Andrius Štikonas 983c46a7ac Fix obsolete ECM variable. 2022-01-20 18:46:33 +00:00
Andrius Štikonas 48c5f67506 Disable Qt6 CI due to KPMcore dependency problem. 2022-01-20 00:51:19 +00:00
Andrius Štikonas 6a66203744 Add KDE_ prefix to cmake variable. 2022-01-19 01:34:49 +00:00
Andrius Štikonas 479631455c Port to Qt6. 2022-01-18 23:44:28 +00:00
Andrius Štikonas 458872f359 Do not use deprecated Qt5 methods. 2022-01-18 23:23:00 +00:00
Andrius Štikonas 850151655e Remove unneccessary include_directories cmake statement. 2022-01-18 21:07:41 +00:00
Andrius Štikonas adacc91e75 Remove unneccessary include_directories cmake statement. 2022-01-18 21:06:09 +00:00
Andrius Štikonas 909a03347a Restrict VERSION defines to main.cpp. 2022-01-18 20:55:55 +00:00
Andrius Štikonas e47827e20c Restrict Qt::AA_UseHighDpiPixmaps to Qt5. 2022-01-18 20:55:55 +00:00
Andrius Štikonas 20d41ef501 Adjust QStringList includes for Qt6. 2022-01-18 20:55:55 +00:00
Andrius Štikonas 0ff20194b0 Port away from deprecated setMargin method. 2022-01-18 20:55:55 +00:00
Andrius Štikonas ca788a9e69 Use QFont enums instead of magic constants. 2022-01-18 20:55:54 +00:00
Andrius Štikonas 7d4ca72118 Use nullptr. 2022-01-18 20:55:54 +00:00
Andrius Štikonas 312079422a Port away from obsolete QtKey::+ operator. 2022-01-18 20:55:54 +00:00
l10n daemon script 843d7e9f19 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-01-18 01:44:45 +00:00
l10n daemon script b29953b6b9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-01-17 01:41:38 +00:00
l10n daemon script 31bdb87514 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-01-16 01:46:31 +00:00
l10n daemon script fb8249cbc9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-01-15 01:46:27 +00:00
l10n daemon script 55f525d5a4 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-01-14 01:48:45 +00:00
l10n daemon script 1430b89952 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-01-13 01:45:47 +00:00
l10n daemon script 28df23863e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-01-12 01:49:44 +00:00
Andrius Štikonas e57c9d1552 Fix clang build.
CCBUG: 446899
CCMAIL: tcanabrava@kde.org
2022-01-10 22:36:04 +00:00
Nate Graham 4703517c75 Add an "Open in Partition Manager" solid Action
This lets you open a device in Partition Manager from the Disks &
Devices applet.

BUG: 446897
FIXED-IN: 22.04
2022-01-10 22:21:40 +00:00
Tomaz Canabrava 825ca30ce7 Accept devices starting with /dev
BUG: 446899
2022-01-10 22:18:13 +00:00
Tomaz Canabrava a8da9ef6c1 Select the partition number if `--device` is passed with it
such as `sda1` or `hda2` will now select the specific partition
2022-01-10 22:18:13 +00:00
Tomaz Canabrava afcc0c6c47 Allow to get the partition nr from the device node 2022-01-10 22:18:13 +00:00
Andrius Štikonas 6f28900350 Silence compiler warning. 2022-01-09 23:48:39 +00:00
Heiko Becker d24f5cd2c1 GIT_SILENT Update Appstream for new release
(cherry picked from commit 7ad2ba7479994f9489f3610bcf6d32554340e72b)
2022-01-03 23:03:29 +01:00
Andrius Štikonas c9751910e8 Select root permissions radio button when new partition dialog is first created. 2021-12-28 16:36:45 +00:00
Andrius Štikonas b9e5a055d4 Check if we need to show permissions groupBox when New Partition dialog is first shown. 2021-12-28 16:27:20 +00:00
Andrius Štikonas 850ab0df40 Remove unused class member variable. 2021-12-28 16:21:40 +00:00
Andrius Štikonas 519bea8fd5 Fix isPermissionOnlyRoot function to return root by default. 2021-12-28 16:17:25 +00:00
Andrius Štikonas 47e6d5f3d2 Separate radiobuttons into two independent groups. 2021-12-28 16:07:22 +00:00
Andrius Štikonas 4e5cbcdb65 Enable permissions choice for other filesystems. 2021-12-28 15:50:30 +00:00
Tomaz Canabrava 1edb947525 Change the way the button is created / fix crash 2021-12-28 15:09:40 +00:00
Tomaz Canabrava 2bcd994bf1 Fix if order
First we need to set the partition permission flags, then we
create the operation.
2021-12-28 15:09:40 +00:00
Tomaz Canabrava bfc445bd7c Add tooltip for the new option 2021-12-28 15:09:40 +00:00
Tomaz Canabrava 6b27467943 Add a button to allow the user to select if the partition is open for
everyone
2021-12-28 15:09:40 +00:00
Alessio Bonfiglio 4f17fc5548 Ask for authentication only once 2021-12-23 00:47:10 +00:00
Albert Astals Cid dffa270506 GIT_SILENT Update Appstream for new release
(cherry picked from commit df23eb698c7741673c056d59327f7a9fc8706e94)
2021-12-11 03:08:45 +01:00
Andrius Štikonas 81bbfea449 Improve tab focus order in create partition dialog.
BUG: 444698
2021-12-04 23:59:13 +00:00
Tomaz Canabrava 479c3f4678 Select device using a command line option
pass --device=/dev/sda to select that device

BUG: 43485
2021-12-01 10:07:47 -03:00
Tomaz Canabrava a577f8a0b8 Add new signal on the mainWindow
We can't just call things on the mainWindow, we need to
wait it to finish some processes before we can safely query things
2021-12-01 10:07:47 -03:00
Tomaz Canabrava a85b63c004 Add Documentation 2021-12-01 10:07:34 -03:00
Tomaz Canabrava 099c753516 Add TODO's on parts of the code 2021-11-30 10:18:14 -03:00
Tomaz Canabrava ae088e1ace Move connections to the ::setupConnecctions method
What's the reason of having a ::setupConnections if there's
connections for the GUI outside of it?
2021-11-30 09:43:25 -03:00
Albert Astals Cid 1c5d0f5b4a Add CI 2021-11-29 22:42:55 +01:00
Tomaz Canabrava a389b0e9ff Warn the user if the polkit files are missing 2021-11-29 11:22:13 -03:00
Tomaz Canabrava a41c31c66f Don't use `d` as variable name
On KDE and Qt apps it's common to use a d-pointer, so naming
a variable `d` has a serious implication of muscle memory.
2021-11-29 09:29:46 -03:00
Heiko Becker 26ef5d3342 GIT_SILENT Upgrade release service version to 22.03.70. 2021-11-08 20:59:33 +01:00
Heiko Becker d951b24fd8 GIT_SILENT Update Appstream for new release
(cherry picked from commit 2a78ce76bf335eb7e044b25ddf721cc52e0a7fd3)
2021-10-31 11:37:20 +01:00
Heiko Becker 6339ca235c GIT_SILENT Update Appstream for new release
(cherry picked from commit 85d09e55e16bf986e807bad218f18225beb761c0)
2021-10-05 00:34:29 +02:00
Andrius Štikonas 4fbf432640 Bump minimal cmake version to 3.16 2021-09-29 17:57:30 +01:00
Heiko Becker 90b0aa2ed4 GIT_SILENT Update Appstream for new release
(cherry picked from commit 73ae918cad91ddf0acb285fbe6c965184c345106)
2021-08-27 23:18:10 +02:00
Heiko Becker d4afb41e87 GIT_SILENT Update Appstream for new release
(cherry picked from commit 5eedb0ee600bf0b0eb21b76954a79c37da9bc080)
2021-08-05 00:11:05 +02:00
l10n daemon script 5264203fe8 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-07-19 01:18:10 +00:00
Albert Astals Cid c0565bd091 GIT_SILENT Upgrade release service version to 21.11.70. 2021-07-10 20:28:57 +02:00
Heiko Becker a3d219f401 GIT_SILENT Update Appstream for new release
(cherry picked from commit ad14f3f296a2eda0f8963533d1822851ece87204)
2021-07-05 21:25:43 +02:00
Andrius Štikonas 9212d74464 Switch default file system to Btrfs
BUG: 438376
2021-06-10 23:22:44 +01:00
Heiko Becker 03fad35e25 GIT_SILENT Update Appstream for new release
(cherry picked from commit 6f696535b7039fd9dec356150ef7e44ba76128b7)
2021-06-05 23:25:30 +02:00
Heiko Becker 2b7cf50f5c GIT_SILENT Update Appstream for new release
(cherry picked from commit 5befa9bc73ed60e9b407c999efdad7536ddc42a6)
2021-05-07 20:40:51 +02:00
l10n daemon script 789a014df2 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-05-07 01:18:46 +00:00
Carl Schwan 072e8c4720 Fix appstream link 2021-04-24 22:09:44 +00:00
Heiko Becker 03dd7cb0e0 GIT_SILENT Update Appstream for new release
(cherry picked from commit 9c576db774eba56b1bdbec3b78db648cc18e0839)
2021-04-14 17:29:50 +02:00
l10n daemon script 8ecb5373c1 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-04-07 01:20:03 +00:00
l10n daemon script 4407b41a21 GIT_SILENT made messages (after extraction) 2021-04-07 00:22:18 +00:00
Andrius Štikonas bdb0d25ace Use untranslated filesystem name for fstab entries.
BUG: 434807
2021-03-23 19:33:28 +00:00
Albert Astals Cid 2e80aa5bdd GIT_SILENT Upgrade release service version to 21.07.70. 2021-03-13 22:28:16 +01:00
Heiko Becker d23a3bde10 GIT_SILENT Update Appstream for new release
(cherry picked from commit cc6735ecff)
2021-02-25 00:48:23 +01:00
Luigi Toscano d58f97bf51 README.md: use the official screenshot
The screenshot(s) in the product-screenshot repository
are the official ones and available through cdn.kde.org.
2021-01-29 23:38:45 +01:00
Heiko Becker c8e2afccb1 GIT_SILENT Update Appstream for new release
(cherry picked from commit 42b5f76fe3)
2021-01-29 21:29:51 +01:00
l10n daemon script 2fcaecab43 GIT_SILENT made messages (after extraction) 2021-01-24 02:50:23 +01:00
l10n daemon script 6385967402 GIT_SILENT made messages (after extraction) 2021-01-18 03:06:02 +01:00
l10n daemon script a428b26f2e GIT_SILENT made messages (after extraction) 2021-01-16 02:53:03 +01:00
Christoph Feck 42c46fa674 GIT_SILENT Update Appstream for new release
(cherry picked from commit a0b0664868)
2021-01-02 15:37:36 +01:00
l10n daemon script c1ca4a3399 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-12-30 06:52:26 +01:00
l10n daemon script 69d03099b0 GIT_SILENT made messages (after extraction) 2020-12-30 03:02:26 +01:00
l10n daemon script 03da1748bc GIT_SILENT made messages (after extraction) 2020-12-07 02:40:05 +01:00
Christoph Feck 2f226daa00 GIT_SILENT Update Appstream for new release
(cherry picked from commit 57f9956033)
2020-12-02 23:48:54 +01:00
Andrius Štikonas 175eaef1b9 Remove unnecessary semicolon. 2020-11-14 01:33:28 +00:00
Andrius Štikonas 03edda5de6 Port away from obsolete QPalette::Foreground. 2020-11-14 01:30:13 +00:00
Andrius Štikonas aa32927848 Port away from deprecated QString::SkipEmptyParts. 2020-11-14 01:16:19 +00:00
Albert Astals Cid f419683cd6 Merge remote-tracking branch 'origin/release/20.12' 2020-11-13 16:04:56 +01:00
Albert Astals Cid 50d8321b3a Add missing kdoctools_install(po) 2020-11-13 16:04:19 +01:00
Albert Astals Cid e40ef5d88d GIT_SILENT Upgrade release service version to 21.03.70. 2020-11-08 19:04:34 +01:00
Albert Astals Cid 80a2b51a68 GIT_SILENT Upgrade release service version to 20.11.80. 2020-11-08 18:25:50 +01:00
Yuri Chornoivan d45ee40326 Remove unneeded parenthesis 2020-10-29 09:09:56 +02:00
Andrius Štikonas 2ab0ceb998 Do not use bash backticks. 2020-10-28 11:13:47 +00:00
Andrius Štikonas cd10b5ba2c Port away from qAsConst. 2020-10-24 22:15:02 +01:00
Andrius Štikonas 7d515e43bf Require C++17. 2020-10-24 22:01:19 +01:00
Andrius Štikonas 631cac66c8 Switch to release service's versioning scheme. 2020-10-16 23:44:15 +01:00
Andrius Štikonas 5a4df98216 Bump minimal KF5 version to that of KPMcore. 2020-10-16 23:39:36 +01:00
36 changed files with 751 additions and 272 deletions

7
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,7 @@
# SPDX-FileCopyrightText: None
# SPDX-License-Identifier: CC0-1.0
include:
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-qt6.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml

19
.kde-ci.yml Normal file
View File

@ -0,0 +1,19 @@
# SPDX-FileCopyrightText: None
# SPDX-License-Identifier: CC0-1.0
Dependencies:
- 'on': ['@all']
'require':
'frameworks/extra-cmake-modules': '@stable'
'frameworks/kconfig': '@stable'
'frameworks/kconfigwidgets': '@stable'
'frameworks/kcoreaddons': '@stable'
'frameworks/kcrash': '@stable'
'frameworks/kdbusaddons': '@stable'
'frameworks/kdoctools': '@stable'
'frameworks/ki18n': '@stable'
'frameworks/kio': '@stable'
'frameworks/kjobwidgets': '@stable'
'frameworks/kwidgetaddons': '@stable'
'frameworks/kxmlgui': '@stable'
'system/kpmcore': '@same'

View File

@ -1,30 +1,26 @@
# SPDX-FileCopyrightText: 2008 Volker Lanz <vl@fidra.de>
# SPDX-FileCopyrightText: 2014-2020 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2014-2022 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-License-Identifier: GPL-3.0-or-later
project(partitionmanager)
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
# KDE Application Version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "22")
set (RELEASE_SERVICE_VERSION_MINOR "03")
set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
project(partitionmanager VERSION ${RELEASE_SERVICE_VERSION})
# Dependencies
set(QT_MIN_VERSION "5.10.0")
set(KF5_MIN_VERSION "5.71")
set(KPMCORE_MIN_VERSION "4.2.0")
set(QT_MIN_VERSION "5.15.0")
set(KF5_MIN_VERSION "5.90")
set(KPMCORE_MIN_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}")
set(KDE_COMPILERSETTINGS_LEVEL "5.85")
set(CMAKE_USE_RELATIVE_PATHS OFF)
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
set(KDE_INSTALL_USE_QT_SYS_PATHS ON CACHE BOOL "Install mkspecs files, Plugins and Imports to the Qt 5 install dir" FORCE)
# Check KPMcore dependency when bumping
set(VERSION_MAJOR "4")
set(VERSION_MINOR "2")
set(VERSION_RELEASE "0")
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE})
add_definitions(-D'VERSION="${VERSION}"') #"
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH})
@ -36,7 +32,11 @@ include(KDECompilerSettings NO_POLICY_SCOPE)
include(FeatureSummary)
include(GenerateExportHeader)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
if (NOT QT_MAJOR_VERSION)
set(QT_MAJOR_VERSION "5")
endif()
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Core
Gui
Widgets
@ -59,32 +59,21 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
DocTools
)
# use sane compile flags
add_definitions(
-DQT_USE_QSTRINGBUILDER
-DQT_NO_CAST_TO_ASCII
-DQT_NO_CAST_FROM_ASCII
-DQT_STRICT_ITERATORS
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_CAST_FROM_BYTEARRAY
-DQT_NO_CAST_TO_BYTEARRAY
-DQT_USE_FAST_OPERATOR_PLUS
-DQT_DISABLE_DEPRECATED_BEFORE=0x050900
-DQT_NO_KEYWORDS
)
find_package(PolkitQt${QT_MAJOR_VERSION}-1 REQUIRED)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
find_package(KPMcore ${KPMCORE_MIN_VERSION} REQUIRED)
include_directories(${Qt5Core_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${BLKID_INCLUDE_DIRS} ${KPMCORE_INCLUDE_DIR} lib/ src/)
add_subdirectory(src)
add_subdirectory(icons)
if (KF5DocTools_FOUND)
add_subdirectory(doc)
kdoctools_install(po)
endif()
ki18n_install(po)
message(STATUS "KDE Partition Manager ${VERSION} will be built for install into ${CMAKE_INSTALL_PREFIX}")
message(STATUS "KDE Partition Manager ${RELEASE_SERVICE_VERSION} will be built for install into ${CMAKE_INSTALL_PREFIX}")
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)

View File

@ -28,7 +28,7 @@ a potentially dangerous program for your data. It has been tested carefully and
there are currently no known bugs that could lead to data loss, but nevertheless
there is always a chance for an error to occur and you might lose your data.
<img src="https://docs.kde.org/trunk5/en/extragear-sysadmin/partitionmanager/resize_howto_4.png" align="center"
<img src="https://cdn.kde.org/screenshots/partitionmanager/partitionmanager.png" align="center"
title="KDE Partition Manager" width="800">
## Installation

View File

@ -3,4 +3,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later
kdoctools_create_handbook( index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR partitionmanager )
kdoctools_create_handbook( index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR partitionmanager )

View File

@ -7,6 +7,8 @@ include(config/CMakeLists.txt)
include(gui/CMakeLists.txt)
include(util/CMakeLists.txt)
set_property(SOURCE main.cpp APPEND PROPERTY COMPILE_DEFINITIONS "VERSION=\"${RELEASE_SERVICE_VERSION}\"")
set(partitionmanager_SRCS
main.cpp
${CONFIG_SRC}
@ -19,13 +21,13 @@ file(GLOB partitionmanager_UIFILES config/*.ui gui/*.ui)
ki18n_wrap_ui(partitionmanager_SRCS ${partitionmanager_UIFILES})
kconfig_add_kcfg_files(partitionmanager_SRCS config.kcfgc)
install(FILES partitionmanager.kcfg DESTINATION ${KCFG_INSTALL_DIR})
install(FILES partitionmanager.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
############################################
add_executable(partitionmanager ${partitionmanager_SRCS} )
target_link_libraries(partitionmanager ${BLKID_LIBRARIES}
target_link_libraries(partitionmanager
kpmcore
KF5::ConfigCore
KF5::ConfigGui
@ -38,13 +40,18 @@ target_link_libraries(partitionmanager ${BLKID_LIBRARIES}
KF5::KIOWidgets
KF5::WidgetsAddons
KF5::XmlGui
PolkitQt${QT_MAJOR_VERSION}-1::Core
)
target_compile_definitions(partitionmanager PRIVATE -DCMAKE_INSTALL_FULL_LIBEXECDIR_KF5=\"${CMAKE_INSTALL_FULL_LIBEXECDIR_KF5}\")
install(TARGETS partitionmanager ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS partitionmanager ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES org.kde.partitionmanager.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
install(FILES gui/partitionmanagerui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/partitionmanager)
install(PROGRAMS org.kde.partitionmanager.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
install(PROGRAMS org.kde.partitionmanager.desktop DESTINATION ${KDE_INSTALL_APPDIR})
############################################
install(FILES open_in_partitionmanager.desktop
open_in_partitionmanager.desktop
DESTINATION ${KDE_INSTALL_DATADIR}/solid/actions/)

View File

@ -4,8 +4,8 @@
# SPDX-License-Identifier: MIT
$EXTRACTRC `find -name \*.rc` >> rc.cpp || exit 11
$EXTRACTRC `find -name \*.ui` >> rc.cpp || exit 12
$EXTRACTRC `find -name \*.kcfg` >> rc.cpp || exit 12
$XGETTEXT `find -name \*.cc -o -name \*.cpp -o -name \*.h` rc.cpp -o $podir/partitionmanager.pot
$EXTRACTRC $(find -name \*.rc) >> rc.cpp || exit 11
$EXTRACTRC $(find -name \*.ui) >> rc.cpp || exit 12
$EXTRACTRC $(find -name \*.kcfg) >> rc.cpp || exit 12
$XGETTEXT $(find -name \*.cc -o -name \*.cpp -o -name \*.h) rc.cpp -o $podir/partitionmanager.pot
rm -f rc.cpp

View File

@ -1,6 +1,6 @@
/*
SPDX-FileCopyrightText: 2010 Volker Lanz <vl@fidra.de>
SPDX-FileCopyrightText: 2014-2018 Andrius Štikonas <andrius@stikonas.eu>
SPDX-FileCopyrightText: 2014-2020 Andrius Štikonas <andrius@stikonas.eu>
SPDX-License-Identifier: GPL-3.0-or-later
*/
@ -13,6 +13,8 @@
#include <util/helpers.h>
#include "util/guihelpers.h"
#include <utility>
#include <config.h>
GeneralPageWidget::GeneralPageWidget(QWidget* parent) :
@ -42,7 +44,7 @@ void GeneralPageWidget::setupDialog()
std::sort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan);
for (const auto &fsName : qAsConst(fsNames))
for (const auto &fsName : std::as_const(fsNames))
comboDefaultFileSystem().addItem(createFileSystemColor(FileSystem::typeForName(fsName), 8), fsName);
setDefaultFileSystem(GuiHelpers::defaultFileSystem());

View File

@ -1,6 +1,6 @@
/*
SPDX-FileCopyrightText: 2016 Chantara Tith <tith.chantara@gmail.com>
SPDX-FileCopyrightText: 2016 Andrius Štikonas <andrius@stikonas.eu>
SPDX-FileCopyrightText: 2016-2020 Andrius Štikonas <andrius@stikonas.eu>
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
SPDX-FileCopyrightText: 2019 Yuri Chornoivan <yurchor@ukr.net>
@ -21,6 +21,8 @@
#include <util/capacity.h>
#include <util/helpers.h>
#include <utility>
#include <QtGlobal>
#include <KConfigGroup>
@ -48,11 +50,11 @@ CreateVolumeGroupDialog::CreateVolumeGroupDialog(QWidget* parent, QString& vgNam
void CreateVolumeGroupDialog::setupDialog()
{
for (const auto &p : qAsConst(LVM::pvList::list())) {
for (const auto &p : std::as_const(LVM::pvList::list())) {
bool toBeDeleted = false;
// Ignore partitions that are going to be deleted
for (const auto &o : qAsConst(m_PendingOps)) {
for (const auto &o : std::as_const(m_PendingOps)) {
if (dynamic_cast<DeleteOperation *>(o) && o->targets(*p.partition())) {
toBeDeleted = true;
break;
@ -66,9 +68,9 @@ void CreateVolumeGroupDialog::setupDialog()
dialogWidget().listPV().addPartition(*p.partition(), false);
}
for (const Device *d : qAsConst(m_Devices)) {
for (const Device *d : std::as_const(m_Devices)) {
if (d->partitionTable() != nullptr) {
for (const Partition *p : qAsConst(d->partitionTable()->children())) {
for (const Partition *p : std::as_const(d->partitionTable()->children())) {
// Looking if there is another VG creation that contains this partition
if (LvmDevice::s_DirtyPVs.contains(p))
continue;
@ -88,7 +90,7 @@ void CreateVolumeGroupDialog::setupDialog()
}
}
for (const Partition *p : qAsConst(LvmDevice::s_OrphanPVs))
for (const Partition *p : std::as_const(LvmDevice::s_OrphanPVs))
if (!LvmDevice::s_DirtyPVs.contains(p))
dialogWidget().listPV().addPartition(*p, false);
}
@ -137,7 +139,7 @@ void CreateVolumeGroupDialog::onVGNameChanged(const QString& vgName)
void CreateVolumeGroupDialog::onSpinPESizeChanged(int newsize)
{
Q_UNUSED(newsize);
Q_UNUSED(newsize)
updateOkButtonStatus();
updateSectorInfos();
}

View File

@ -10,9 +10,9 @@
#define EDITMOUNTOPTIONSDIALOG_H
#include <QDialog>
#include <QStringList>
class EditMountOptionsDialogWidget;
class QStringList;
class QString;
class QWidget;

View File

@ -10,9 +10,9 @@
#include "ui_editmountoptionsdialogwidgetbase.h"
#include <QStringList>
#include <QWidget>
class QStringList;
class QPlainTextEdit;
class EditMountOptionsDialogWidget : public QWidget, public Ui::EditMountOptionsDialogWidgetBase

View File

@ -63,7 +63,7 @@ EditMountPointDialogWidget::EditMountPointDialogWidget(QWidget* parent, Partitio
fsName = QStringLiteral("vfat");
break;
default:
fsName = partition().fileSystem().name();
fsName = partition().fileSystem().name({QStringLiteral("C")});
}
m_fstabEntries.push_back(FstabEntry(m_deviceNode, QString(), fsName, QString()));
@ -152,6 +152,8 @@ void EditMountPointDialogWidget::setupRadio(const FstabEntry::Type entryType)
break;
case FstabEntry::Type::comment:
break;
default:
break;
}
}
@ -198,7 +200,7 @@ void EditMountPointDialogWidget::buttonMoreClicked(bool)
QStringList EditMountPointDialogWidget::options() const
{
QStringList optList = m_Options.split(QLatin1Char(','), QString::SkipEmptyParts);
QStringList optList = m_Options.split(QLatin1Char(','), Qt::SkipEmptyParts);
const auto keys = boxOptions();
for (const auto &s : keys)

View File

@ -16,6 +16,7 @@
#include <map>
#include <QString>
#include <QStringList>
#include <QWidget>
class Partition;
@ -25,7 +26,6 @@ class QSpinBox;
class QCheckBox;
class QComboBox;
class QPushButton;
class QStringList;
class EditMountPointDialogWidget : public QWidget, public Ui::EditMountPointDialogWidgetBase
{

View File

@ -20,7 +20,7 @@ public:
double valueFromText(const QString& text) const override;
private:
QString stripped(const QString &t, int *pos = 0) const;
QString stripped(const QString &t, int *pos = nullptr) const;
};
#endif

View File

@ -27,6 +27,7 @@
#include <QGridLayout>
#include <QLabel>
#include <QLocale>
#include <QPalette>
#include <KLocalizedString>
@ -37,7 +38,7 @@ InfoPane::InfoPane(QWidget* parent) :
QWidget(parent),
m_GridLayout(new QGridLayout(this))
{
layout()->setMargin(0);
layout()->setContentsMargins(0, 0, 0, 0);
}
/** Clears the InfoPane, leaving it empty */
@ -55,7 +56,7 @@ int InfoPane::createHeader(const QString& title, const int num_cols)
QLabel* label = new QLabel(title, this);
QFont font;
font.setBold(true);
font.setWeight(75);
font.setWeight(QFont::Bold);
label->setFont(font);
label->setAlignment(Qt::AlignCenter);
gridLayout().addWidget(label, y++, 0, 1, num_cols);
@ -75,9 +76,9 @@ void InfoPane::createLabels(const QString& title, const QString& value, const in
labelTitle->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter);
QPalette palette = labelTitle->palette();
QColor f = palette.color(QPalette::Foreground);
QColor f = palette.color(QPalette::WindowText);
f.setAlpha(128);
palette.setColor(QPalette::Foreground, f);
palette.setColor(QPalette::WindowText, f);
labelTitle->setPalette(palette);
gridLayout().addWidget(labelTitle, y, x, 1, 1);

View File

@ -39,6 +39,8 @@ public:
void setActionCollection(KActionCollection* coll) {
m_ActionCollection = coll;
}
// Selects the device specified by the device node, such as /dev/sda
bool setSelectedDevice(const QString& device_node);
void updateDevices(const OperationStack::Devices& devices);

View File

@ -54,6 +54,8 @@
#include <util/guihelpers.h>
#include <util/report.h>
#include <algorithm>
#include <QApplication>
#include <QCloseEvent>
#include <QCollator>
@ -70,6 +72,9 @@
#include <QTemporaryFile>
#include <QTextStream>
#include <PolkitQt1/Authority>
#include <polkitqt1-version.h>
#include <KAboutApplicationDialog>
#include <KActionCollection>
#include <KMessageBox>
@ -95,11 +100,10 @@ MainWindow::MainWindow(QWidget* parent) :
m_ScanProgressDialog(new ScanProgressDialog(this)),
m_StatusText(new QLabel(this))
{
CoreBackend::isPolkitInstalledCorrectly();
setupObjectNames();
setupUi(this);
connect(&m_ListDevices->listDevices(), &QListWidget::customContextMenuRequested, this, &MainWindow::listDevicesContextMenuRequested);
connect(&m_TreeLog->treeLog(), &QTreeWidget::customContextMenuRequested, this, &MainWindow::treeLogContextMenuRequested);
connect(&m_ListOperations->listOperations(), &QListWidget::customContextMenuRequested, this, &MainWindow::listOperationsContextMenuRequested);
init();
}
@ -112,12 +116,35 @@ void MainWindow::setupObjectNames()
m_ScanProgressDialog->setObjectName(QStringLiteral("m_ScanProgressDialog"));
}
void MainWindow::setDisallowOtherDevices()
{
// We need to store that we are hiding this for this session only
// but only if it's currently visible (ie, the user didn't select
// that it should be hidden on purpose.
if (m_DockDevices->isVisible() == true) {
Config::self()->setHideDeviceDockWidgetByCmdArgs(true);
}
// because of how Qt works, the user still can enable the
// dock widget via a mouse click, so we need to also set it to disabled.
// so that the user doesn't select it by mistake.
m_DockDevices->setVisible(false);
m_DockDevices->setEnabled(false);
}
void MainWindow::showDevicePanelIfPreviouslyHiddenByDisallowOtherDevices()
{
if (Config::self()->hideDeviceDockWidgetByCmdArgs()) {
m_DockDevices->setVisible(true);
Config::self()->setHideDeviceDockWidgetByCmdArgs(false);
}
}
void MainWindow::init()
{
treeLog().init();
connect(GlobalLog::instance(), &GlobalLog::newMessage, &treeLog(), &TreeLog::onNewLogMessage);
setupActions();
setupStatusBar();
setupConnections();
@ -129,10 +156,67 @@ void MainWindow::init()
loadConfig();
// this is done in order to hide the title bar of MessageWidget dock
findChild<QDockWidget*>(QStringLiteral("MessageWidgetDock"))->setTitleBarWidget(new QWidget());
MessageWidget().hide();
MessageWidget().setText(
i18nc("@info", "Partition Manager requires privileges in order to work. Please refresh the devices and authenticate when prompted."));
show();
pmWidget().init(&operationStack());
scanDevices();
scanProgressDialog().cancel();
setEnabled(false);
guiFactory()->container(QStringLiteral("selectedDevice"), this)->setEnabled(false);
askForPermissions();
if (m_permissionGranted) {
FileSystemFactory::init();
scanDevices();
} else
Q_EMIT showMessageWidget();
setEnabled(true);
}
void MainWindow::askForPermissions()
{
PolkitQt1::UnixProcessSubject subject(QApplication::applicationPid());
PolkitQt1::Authority *authority = PolkitQt1::Authority::instance();
PolkitQt1::Authority::Result result;
QEventLoop e;
connect(authority, &PolkitQt1::Authority::checkAuthorizationFinished, &e,
[&e, &result](PolkitQt1::Authority::Result _result) {
result = _result;
e.quit();
});
authority->checkAuthorization(QStringLiteral("org.kde.kpmcore.externalcommand.init"), subject, PolkitQt1::Authority::AllowUserInteraction);
e.exec();
if (authority->hasError()) {
qDebug() << "Encountered error while checking authorization, error code:"
<< authority->lastError() << authority->errorDetails();
authority->clearError();
}
m_permissionGranted = result == PolkitQt1::Authority::Yes;
}
QMenu *MainWindow::createPopupMenu()
{
auto menu = QMainWindow::createPopupMenu();
auto actions = menu->actions();
QAction *toRemove =
*std::find_if(actions.begin(), actions.end(),
[](QAction *x) { return x->text().isEmpty(); });
// this is done in order to hide the entry for the MessageWidget dock
menu->removeAction(toRemove);
return menu;
}
void MainWindow::closeEvent(QCloseEvent* event)
@ -192,7 +276,7 @@ void MainWindow::setupActions()
undoOperation->setText(xi18nc("@action:inmenu", "Undo"));
undoOperation->setToolTip(xi18nc("@info:tooltip", "Undo the last operation"));
undoOperation->setStatusTip(xi18nc("@info:status", "Remove the last operation from the list."));
actionCollection()->setDefaultShortcut(undoOperation, QKeySequence(Qt::CTRL + Qt::Key_Z));
actionCollection()->setDefaultShortcut(undoOperation, QKeySequence(Qt::CTRL | Qt::Key_Z));
undoOperation->setIcon(QIcon::fromTheme(QStringLiteral("edit-undo")));
QAction* clearAllOperations = actionCollection()->addAction(QStringLiteral("clearAllOperations"));
@ -218,7 +302,7 @@ void MainWindow::setupActions()
createNewPartitionTable->setText(xi18nc("@action:inmenu", "New Partition Table"));
createNewPartitionTable->setToolTip(xi18nc("@info:tooltip", "Create a new partition table"));
createNewPartitionTable->setStatusTip(xi18nc("@info:status", "Create a new and empty partition table on a device."));
actionCollection()->setDefaultShortcut(createNewPartitionTable, QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_N));
actionCollection()->setDefaultShortcut(createNewPartitionTable, QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_N));
createNewPartitionTable->setIcon(QIcon::fromTheme(QStringLiteral("edit-clear")));
QAction* exportPartitionTable = actionCollection()->addAction(QStringLiteral("exportPartitionTable"));
@ -288,7 +372,7 @@ void MainWindow::setupActions()
newPartition->setText(xi18nc("@action:inmenu create a new partition", "New"));
newPartition->setToolTip(xi18nc("@info:tooltip", "New partition"));
newPartition->setStatusTip(xi18nc("@info:status", "Create a new partition."));
actionCollection()->setDefaultShortcut(newPartition, QKeySequence(Qt::CTRL + Qt::Key_N));
actionCollection()->setDefaultShortcut(newPartition, QKeySequence(Qt::CTRL | Qt::Key_N));
newPartition->setIcon(QIcon::fromTheme(QStringLiteral("document-new")));
QAction* resizePartition = actionCollection()->addAction(QStringLiteral("resizePartition"));
@ -297,7 +381,7 @@ void MainWindow::setupActions()
resizePartition->setText(xi18nc("@action:inmenu", "Resize/Move"));
resizePartition->setToolTip(xi18nc("@info:tooltip", "Resize or move partition"));
resizePartition->setStatusTip(xi18nc("@info:status", "Shrink, grow or move an existing partition."));
actionCollection()->setDefaultShortcut(resizePartition, QKeySequence(Qt::CTRL + Qt::Key_R));
actionCollection()->setDefaultShortcut(resizePartition, QKeySequence(Qt::CTRL | Qt::Key_R));
resizePartition->setIcon(QIcon::fromTheme(QStringLiteral("arrow-right-double")));
QAction* deletePartition = actionCollection()->addAction(QStringLiteral("deletePartition"));
@ -315,7 +399,7 @@ void MainWindow::setupActions()
shredPartition->setText(xi18nc("@action:inmenu", "Shred"));
shredPartition->setToolTip(xi18nc("@info:tooltip", "Shred partition"));
shredPartition->setStatusTip(xi18nc("@info:status", "Shred a partition so that its contents cannot be restored."));
actionCollection()->setDefaultShortcut(shredPartition, QKeySequence(Qt::SHIFT + Qt::Key_Delete));
actionCollection()->setDefaultShortcut(shredPartition, QKeySequence(Qt::SHIFT | Qt::Key_Delete));
shredPartition->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete-shred")));
QAction* copyPartition = actionCollection()->addAction(QStringLiteral("copyPartition"));
@ -324,7 +408,7 @@ void MainWindow::setupActions()
copyPartition->setText(xi18nc("@action:inmenu", "Copy"));
copyPartition->setToolTip(xi18nc("@info:tooltip", "Copy partition"));
copyPartition->setStatusTip(xi18nc("@info:status", "Copy an existing partition."));
actionCollection()->setDefaultShortcut(copyPartition, QKeySequence(Qt::CTRL + Qt::Key_C));
actionCollection()->setDefaultShortcut(copyPartition, QKeySequence(Qt::CTRL | Qt::Key_C));
copyPartition->setIcon(QIcon::fromTheme(QStringLiteral("edit-copy")));
QAction* pastePartition = actionCollection()->addAction(QStringLiteral("pastePartition"));
@ -333,7 +417,7 @@ void MainWindow::setupActions()
pastePartition->setText(xi18nc("@action:inmenu", "Paste"));
pastePartition->setToolTip(xi18nc("@info:tooltip", "Paste partition"));
pastePartition->setStatusTip(xi18nc("@info:status", "Paste a copied partition."));
actionCollection()->setDefaultShortcut(pastePartition, QKeySequence(Qt::CTRL + Qt::Key_V));
actionCollection()->setDefaultShortcut(pastePartition, QKeySequence(Qt::CTRL | Qt::Key_V));
pastePartition->setIcon(QIcon::fromTheme(QStringLiteral("edit-paste")));
QAction* editMountPoint = actionCollection()->addAction(QStringLiteral("editMountPoint"));
@ -396,7 +480,7 @@ void MainWindow::setupActions()
createVolumeGroup->setText(i18nc("@action:inmenu", "New Volume Group"));
createVolumeGroup->setToolTip(i18nc("@info:tooltip", "Create a new LVM Volume Group"));
createVolumeGroup->setStatusTip(i18nc("@info:status", "Create a new LVM Volume Group as a device."));
actionCollection()->setDefaultShortcut(createVolumeGroup, QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_L));
actionCollection()->setDefaultShortcut(createVolumeGroup, QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_L));
createVolumeGroup->setIcon(QIcon::fromTheme(QStringLiteral("document-new")));
QAction* fileSystemSupport = actionCollection()->addAction(QStringLiteral("fileSystemSupport"));
@ -412,6 +496,7 @@ void MainWindow::setupActions()
refreshDevices->setStatusTip(xi18nc("@info:status", "Renew the devices list."));
actionCollection()->setDefaultShortcut(refreshDevices, Qt::Key_F5);
refreshDevices->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh")));
MessageWidget().addAction(refreshDevices);
// Settings Actions
actionCollection()->addAction(QStringLiteral("toggleDockDevices"), dockDevices().toggleViewAction());
@ -447,8 +532,26 @@ void MainWindow::setupActions()
void MainWindow::setupConnections()
{
connect(&listDevices(), &ListDevices::selectionChanged, &pmWidget(), qOverload<const QString&>(&PartitionManagerWidget::setSelectedDevice));
connect(&listDevices(), &ListDevices::deviceDoubleClicked, this, &MainWindow::onPropertiesDevice);
connect(&listDevices(), &ListDevices::selectionChanged,
&pmWidget(), qOverload<const QString&>(&PartitionManagerWidget::setSelectedDevice));
connect(&listDevices(), &ListDevices::deviceDoubleClicked,
this, &MainWindow::onPropertiesDevice);
connect(&m_ListDevices->listDevices(), &QListWidget::customContextMenuRequested,
this, &MainWindow::listDevicesContextMenuRequested);
connect(&m_TreeLog->treeLog(), &QTreeWidget::customContextMenuRequested,
this, &MainWindow::treeLogContextMenuRequested);
connect(&m_ListOperations->listOperations(), &QListWidget::customContextMenuRequested,
this, &MainWindow::listOperationsContextMenuRequested);
connect(GlobalLog::instance(), &GlobalLog::newMessage,
&treeLog(), &TreeLog::onNewLogMessage);
connect(this, &MainWindow::showMessageWidget, &MessageWidget(),
&KMessageWidget::animatedShow);
connect(this, &MainWindow::hideMessageWidget, &MessageWidget(),
&KMessageWidget::animatedHide);
}
void MainWindow::setupStatusBar()
@ -731,7 +834,13 @@ void MainWindow::on_m_DeviceScanner_finished()
scanProgressDialog().setProgress(100);
if (!operationStack().previewDevices().isEmpty())
bool foundDevices = !operationStack().previewDevices().isEmpty();
guiFactory()
->container(QStringLiteral("selectedDevice"), this)
->setEnabled(foundDevices);
if (foundDevices)
pmWidget().setSelectedDevice(operationStack().previewDevices()[0]);
pmWidget().updatePartitions();
@ -741,11 +850,12 @@ void MainWindow::on_m_DeviceScanner_finished()
// try to set the seleted device, either from the saved one or just select the
// first device
if (!listDevices().setSelectedDevice(savedSelectedDeviceNode()) && !operationStack().previewDevices().isEmpty())
if (!listDevices().setSelectedDevice(savedSelectedDeviceNode()) && foundDevices)
listDevices().setSelectedDevice(operationStack().previewDevices()[0]->deviceNode());
updateSeletedDeviceMenu();
checkFileSystemSupport();
Q_EMIT scanFinished();
}
void MainWindow::updateSeletedDeviceMenu()
@ -804,7 +914,17 @@ void MainWindow::onRefreshDevices()
xi18nc("@title:window", "Really Rescan the Devices?"),
KGuiItem(xi18nc("@action:button", "Rescan Devices"), QStringLiteral("arrow-right")),
KStandardGuiItem::cancel(), QStringLiteral("reallyRescanDevices")) == KMessageBox::Continue) {
scanDevices();
if (m_permissionGranted) {
scanDevices();
} else {
askForPermissions();
if (m_permissionGranted) {
Q_EMIT hideMessageWidget();
FileSystemFactory::init();
scanDevices();
}
}
}
}
@ -897,6 +1017,8 @@ void MainWindow::onImportPartitionTable()
{
Q_ASSERT(pmWidget().selectedDevice());
// TODO: This method looks like should live somewhere completely different.
// It's importing the partition table, why it's not on the partition table source?
const QUrl url = QFileDialog::getOpenFileUrl(this, QStringLiteral("Import Partition Table"));
if (url.isEmpty())
@ -1257,6 +1379,7 @@ static KLocalizedString checkSupportInNode(const PartitionNode* parent)
else
rval = checkSupportInNode(node);
// TODO: Don't create HTML tables manually.
if ((!p->fileSystem().supportToolFound() && !p->fileSystem().supportToolName().name.isEmpty()) && !rval.isEmpty())
rval = kxi18n("%1%2").subs(rval).subs(kxi18n("<tr>"
"<td>%1</td>"
@ -1303,6 +1426,7 @@ void MainWindow::checkFileSystemSupport()
}
if (missingSupportTools)
// TODO: Don't create HTML manually.
KMessageBox::information(this,
xi18nc("@info",
"<para>No support tools were found for file systems currently present on hard disks in this computer:</para>"
@ -1321,3 +1445,24 @@ void MainWindow::checkFileSystemSupport()
xi18nc("@title:window", "Missing File System Support Packages"),
QStringLiteral("showInformationOnMissingFileSystemSupport"), KMessageBox::Notify | KMessageBox::AllowLink);
}
void MainWindow::setCurrentDeviceByName(const QString& name)
{
// TODO: Port KPartitionManager away from KMessageBox into KMessageWidget.
// TODO: setSelectedDevice from m_ListDevices is not using a device name, but
// just issuing a match query on a string list, this will produce false results.
if (!m_ListDevices->setSelectedDevice(name)) {
KMessageBox::error(this,
xi18nc("@info device should be inside of /dev", "Unrecognized device \"%1\" ", name),
xi18nc("@title:window", "Error While Importing Partition Table"));
}
}
void MainWindow::setCurrentPartitionByName(const QString& partitionName)
{
if (!pmWidget().setCurrentPartitionByName(partitionName)) {
KMessageBox::error(this,
xi18nc("@info device should be inside of /dev", "Unrecognized partition \"%1\" ", partitionName),
xi18nc("@title:window", "Error opening partition"));
}
}

View File

@ -17,6 +17,7 @@
#include "ui_mainwindowbase.h"
#include <KMessageWidget>
#include <KXmlGuiWindow>
class ApplyProgressDialog;
@ -44,8 +45,28 @@ class MainWindow : public KXmlGuiWindow, public Ui::MainWindowBase
public:
explicit MainWindow(QWidget* parent = nullptr);
// for instance `/dev/sda`
void setCurrentDeviceByName(const QString& name);
void setCurrentPartitionByName(const QString& partitionNumber);
// forbids the user to select another device.
// this is used in conjunction with --device
// rationale is that if the user specifies a device,
// we can't allow him to select another one by mistake while
// clicking in the UI.
void setDisallowOtherDevices();
// disallowOtherDevices hides the DockWidget, but unfortunately
// this is saved by the Window State when restored, even if we
// are not disallowing it this time. At the same time the user
// could have hidden it, so we need to restore only if hidden
// just by the call to disallowOtherDevices().
void showDevicePanelIfPreviouslyHiddenByDisallowOtherDevices();
Q_SIGNALS:
void settingsChanged();
void scanFinished();
protected:
void init();
@ -202,6 +223,15 @@ protected:
return *m_ScanProgressDialog;
}
KMessageWidget &MessageWidget() {
Q_ASSERT(m_MessageWidget);
return *m_MessageWidget;
}
const KMessageWidget &MessageWidget() const {
Q_ASSERT(m_MessageWidget);
return *m_MessageWidget;
}
void onSelectedDeviceMenuTriggered(bool);
protected Q_SLOTS:
@ -251,6 +281,15 @@ protected:
void onSmartStatusDevice();
void onPropertiesDevice(const QString& deviceNode = {});
private:
QMenu* createPopupMenu() override;
void askForPermissions();
Q_SIGNALS:
void showMessageWidget();
void hideMessageWidget();
private:
OperationStack* m_OperationStack;
OperationRunner* m_OperationRunner;
@ -259,6 +298,8 @@ private:
ScanProgressDialog* m_ScanProgressDialog;
QLabel* m_StatusText;
QString m_SavedSelectedDeviceNode;
bool m_permissionGranted;
};
#endif

View File

@ -17,8 +17,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<property name="windowTitle">
<string comment="@title:window">KDE Partition Manager</string>
</property>
<widget class="PartitionManagerWidget" name="m_PartitionManagerWidget">
</widget>
<widget class="PartitionManagerWidget" name="m_PartitionManagerWidget"/>
<widget class="QDockWidget" name="m_DockDevices">
<property name="allowedAreas">
<set>Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea</set>
@ -29,8 +28,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<attribute name="dockWidgetArea">
<number>1</number>
</attribute>
<widget class="ListDevices" name="m_ListDevices">
</widget>
<widget class="ListDevices" name="m_ListDevices"/>
</widget>
<widget class="QDockWidget" name="m_DockOperations">
<property name="allowedAreas">
@ -42,8 +40,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<attribute name="dockWidgetArea">
<number>8</number>
</attribute>
<widget class="ListOperations" name="m_ListOperations">
</widget>
<widget class="ListOperations" name="m_ListOperations"/>
</widget>
<widget class="QDockWidget" name="m_DockInformation">
<property name="windowTitle">
@ -52,8 +49,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<attribute name="dockWidgetArea">
<number>1</number>
</attribute>
<widget class="InfoPane" name="m_InfoPane">
</widget>
<widget class="InfoPane" name="m_InfoPane"/>
</widget>
<widget class="QDockWidget" name="m_DockLog">
<property name="allowedAreas">
@ -65,11 +61,34 @@ SPDX-License-Identifier: GPL-3.0-or-later
<attribute name="dockWidgetArea">
<number>8</number>
</attribute>
<widget class="TreeLog" name="m_TreeLog">
<widget class="TreeLog" name="m_TreeLog"/>
</widget>
<widget class="QDockWidget" name="MessageWidgetDock">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="features">
<set>QDockWidget::NoDockWidgetFeatures</set>
</property>
<attribute name="dockWidgetArea">
<number>4</number>
</attribute>
<widget class="KMessageWidget" name="m_MessageWidget">
<property name="messageType">
<enum>KMessageWidget::Warning</enum>
</property>
</widget>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>KMessageWidget</class>
<extends>QFrame</extends>
<header>kmessagewidget.h</header>
</customwidget>
<customwidget>
<class>PartitionManagerWidget</class>
<extends>QWidget</extends>

View File

@ -1,6 +1,6 @@
/*
SPDX-FileCopyrightText: 2008-2012 Volker Lanz <vl@fidra.de>
SPDX-FileCopyrightText: 2013-2018 Andrius Štikonas <andrius@stikonas.eu>
SPDX-FileCopyrightText: 2013-2020 Andrius Štikonas <andrius@stikonas.eu>
SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
SPDX-FileCopyrightText: 2016 Chantara Tith <tith.chantara@gmail.com>
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
@ -22,8 +22,11 @@
#include <util/helpers.h>
#include "util/guihelpers.h"
#include <utility>
#include <QtGlobal>
#include <QFontDatabase>
#include <QPalette>
#include <KColorScheme>
#include <KConfigGroup>
@ -72,7 +75,7 @@ void NewDialog::setupDialog()
std::sort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan);
for (const auto &fsName : qAsConst(fsNames))
for (const auto &fsName : std::as_const(fsNames))
dialogWidget().comboFileSystem().addItem(createFileSystemColor(FileSystem::typeForName(fsName), 8), fsName);
QString selected = FileSystem::nameForType(GuiHelpers::defaultFileSystem());
@ -110,6 +113,34 @@ void NewDialog::setupDialog()
// run there is a valid partition set in the part resizer widget and they will need that.
onRoleChanged(false);
onFilesystemChanged(dialogWidget().comboFileSystem().currentIndex());
auto showPermissionsGroup = [this] {
const QString currText = dialogWidget().comboFileSystem().currentText();
const bool enablePosixPermission = QList<QString>({
QStringLiteral("btrfs"),
QStringLiteral("ext2"),
QStringLiteral("ext3"),
QStringLiteral("ext4"),
QStringLiteral("f2fs"),
QStringLiteral("hfsplus"),
QStringLiteral("jfs"),
QStringLiteral("minix"),
QStringLiteral("ocfs2"),
QStringLiteral("reiserfs"),
QStringLiteral("reiser4"),
QStringLiteral("udf"),
QStringLiteral("xfs"),
QStringLiteral("zfs"),}
).contains(currText);
if (enablePosixPermission) {
dialogWidget().showPosixPermissions();
} else {
dialogWidget().hidePosixPermissions();
}
};
connect(&dialogWidget().comboFileSystem(), QOverload<int>::of(&QComboBox::currentIndexChanged), this, showPermissionsGroup);
showPermissionsGroup();
dialogWidget().radioRootPermissions().setChecked(true);
}
void NewDialog::setupConnections()
@ -250,9 +281,9 @@ void NewDialog::updateHideAndShow()
dialogWidget().noSetLabel().setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
QPalette palette = dialogWidget().noSetLabel().palette();
QColor f = palette.color(QPalette::Foreground);
QColor f = palette.color(QPalette::WindowText);
f.setAlpha(128);
palette.setColor(QPalette::Foreground, f);
palette.setColor(QPalette::WindowText, f);
dialogWidget().noSetLabel().setPalette(palette);
dialogWidget().checkBoxEncrypt().hide();
dialogWidget().editPassphrase().hide();
@ -281,3 +312,8 @@ void NewDialog::updateOkButtonStatus()
{
okButton->setEnabled(isValidPassword() && isValidLVName());
}
bool NewDialog::useUnsecuredPartition() const
{
return !dialogWidget().isPermissionOnlyRoot();
}

View File

@ -30,6 +30,9 @@ public:
NewDialog(QWidget* parent, Device& device, Partition& unallocatedPartition, PartitionRole::Roles r);
~NewDialog();
// returns true if any user can write on the partition.
// has the same effect as running `chmod 777` on it.
bool useUnsecuredPartition() const;
protected:
void accept() override;
void onRoleChanged(bool);

View File

@ -94,9 +94,6 @@ void PartitionManagerWidget::init(OperationStack* ostack)
{
m_OperationStack = ostack;
// TODO: shouldn't this also go to the main window class?
FileSystemFactory::init();
loadConfig();
setupConnections();
}
@ -244,7 +241,7 @@ void PartitionManagerWidget::updatePartitions()
QFont font;
font.setBold(true);
font.setWeight(75);
font.setWeight(QFont::Bold);
deviceItem->setFont(0, font);
deviceItem->setText(0, selectedDevice()->prettyName());
@ -285,6 +282,25 @@ void PartitionManagerWidget::on_m_TreePartitions_currentItemChanged(QTreeWidgetI
partTableWidget().setActiveWidget(nullptr);
}
bool PartitionManagerWidget::setCurrentPartitionByName(const QString& name)
{
auto rootNode = treePartitions().invisibleRootItem();
for (int i = 0; i < rootNode->childCount(); i++) {
auto driveNode = rootNode->child(i);
for (int e = 0; e < driveNode->childCount(); e++) {
auto partitionNode = driveNode->child(e);
const QString text = partitionNode->data(0, Qt::DisplayRole).toString();
if (text.endsWith(name)) {
partitionNode->setSelected(true);
treePartitions().setCurrentItem(partitionNode);
return true;
}
}
}
return false;
}
void PartitionManagerWidget::on_m_TreePartitions_itemDoubleClicked(QTreeWidgetItem* item, int)
{
if (item == treePartitions().topLevelItem(0)) {
@ -507,10 +523,14 @@ void PartitionManagerWidget::onNewPartition()
Partition* newPartition = NewOperation::createNew(*selectedPartition(), static_cast<FileSystem::Type>(Config::defaultFileSystem()));
QPointer<NewDialog> dlg = new NewDialog(this, *selectedDevice(), *newPartition, selectedDevice()->partitionTable()->childRoles(*selectedPartition()));
if (dlg->exec() == QDialog::Accepted)
if (dlg->exec() == QDialog::Accepted) {
if (dlg->useUnsecuredPartition()) {
newPartition->fileSystem().setPosixPermissions(QStringLiteral("777"));
}
operationStack().push(new NewOperation(*selectedDevice(), newPartition));
else
} else {
delete newPartition;
}
delete dlg;
}

View File

@ -94,6 +94,9 @@ public:
void updatePartitions();
// here we expect the full "sda1" or "nvme1n1p1"
bool setCurrentPartitionByName(const QString& partitionName);
protected:
OperationStack& operationStack() {
return *m_OperationStack;
@ -125,6 +128,7 @@ protected:
return *m_TreePartitions;
}
void onHeaderContextMenu(const QPoint& p);
protected Q_SLOTS:

View File

@ -1,6 +1,6 @@
/*
SPDX-FileCopyrightText: 2008-2010 Volker Lanz <vl@fidra.de>
SPDX-FileCopyrightText: 2014-2017 Andrius Štikonas <andrius@stikonas.eu>
SPDX-FileCopyrightText: 2014-2020 Andrius Štikonas <andrius@stikonas.eu>
SPDX-FileCopyrightText: 2014 Yuri Chornoivan <yurchor@ukr.net>
SPDX-FileCopyrightText: 2018 Abhijeet Sharma <sharma.abhijeet2096@gmail.com>
@ -19,11 +19,14 @@
#include <util/helpers.h>
#include "util/guihelpers.h"
#include <utility>
#include <QComboBox>
#include <QFontDatabase>
#include <QtGlobal>
#include <QLineEdit>
#include <QLocale>
#include <QPalette>
#include <QPushButton>
#include <KConfigGroup>
@ -200,9 +203,9 @@ void PartPropsDialog::updateHideAndShow()
dialogWidget().noSetLabel().setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
QPalette palette = dialogWidget().noSetLabel().palette();
QColor f = palette.color(QPalette::Foreground);
QColor f = palette.color(QPalette::WindowText);
f.setAlpha(128);
palette.setColor(QPalette::Foreground, f);
palette.setColor(QPalette::WindowText, f);
dialogWidget().noSetLabel().setPalette(palette);
} else {
dialogWidget().label().setReadOnly(isReadOnly() && !partition().fileSystem().supportSetLabelOnline());
@ -319,7 +322,7 @@ void PartPropsDialog::setupFileSystemComboBox()
std::sort(fsNames.begin(), fsNames.end(), caseInsensitiveLessThan);
for (const auto &fsName : qAsConst(fsNames))
for (const auto &fsName : std::as_const(fsNames))
dialogWidget().fileSystem().addItem(createFileSystemColor(FileSystem::typeForName(fsName), 8), fsName);
dialogWidget().fileSystem().setCurrentIndex(dialogWidget().fileSystem().findText(selected));

View File

@ -1,6 +1,6 @@
/*
SPDX-FileCopyrightText: 2016 Chantara Tith <tith.chantara@gmail.com>
SPDX-FileCopyrightText: 2016-2018 Andrius Štikonas <andrius@stikonas.eu>
SPDX-FileCopyrightText: 2016-2020 Andrius Štikonas <andrius@stikonas.eu>
SPDX-FileCopyrightText: 2018 Caio Jordão Carvalho <caiojcarvalho@gmail.com>
SPDX-FileCopyrightText: 2019 Yuri Chornoivan <yurchor@ukr.net>
@ -20,6 +20,8 @@
#include <util/capacity.h>
#include <util/helpers.h>
#include <utility>
#include <KConfigGroup>
#include <KLocalizedString>
#include <KSharedConfig>
@ -46,11 +48,11 @@ ResizeVolumeGroupDialog::ResizeVolumeGroupDialog(QWidget* parent, VolumeManagerD
void ResizeVolumeGroupDialog::setupDialog()
{
if (dialogWidget().volumeType().currentText() == QStringLiteral("LVM")) {
for (const auto &p : qAsConst(LVM::pvList::list())) {
for (const auto &p : std::as_const(LVM::pvList::list())) {
bool toBeDeleted = false;
// Ignore partitions that are going to be deleted
for (const auto &o : qAsConst(m_PendingOps)) {
for (const auto &o : std::as_const(m_PendingOps)) {
if (dynamic_cast<DeleteOperation *>(o) && o->targets(*p.partition())) {
toBeDeleted = true;
break;
@ -68,9 +70,9 @@ void ResizeVolumeGroupDialog::setupDialog()
dialogWidget().listPV().addPartition(*p.partition(), false);
}
for (const Device *d : qAsConst(m_Devices)) {
for (const Device *d : std::as_const(m_Devices)) {
if (d->partitionTable() != nullptr) {
for (const Partition *p : qAsConst(d->partitionTable()->children())) {
for (const Partition *p : std::as_const(d->partitionTable()->children())) {
// Looking if there is another VG creation that contains this partition
if (LvmDevice::s_DirtyPVs.contains(p))
continue;
@ -90,7 +92,7 @@ void ResizeVolumeGroupDialog::setupDialog()
}
}
for (const Partition *p : qAsConst(LvmDevice::s_OrphanPVs))
for (const Partition *p : std::as_const(LvmDevice::s_OrphanPVs))
if (!LvmDevice::s_DirtyPVs.contains(p))
dialogWidget().listPV().addPartition(*p, false);
}

View File

@ -26,12 +26,13 @@ void ScanProgressDialog::closeEvent(QCloseEvent* e)
e->ignore();
}
void ScanProgressDialog::setDeviceName(const QString& d)
void ScanProgressDialog::setDeviceName(const QString& device)
{
if (d.isEmpty())
if (device.isEmpty()) {
setLabelText(xi18nc("@label", "Scanning..."));
else
setLabelText(xi18nc("@label", "Scanning device: <filename>%1</filename>", d));
} else {
setLabelText(xi18nc("@label", "Scanning device: <filename>%1</filename>", device));
}
}
void ScanProgressDialog::showEvent(QShowEvent* e)

View File

@ -19,7 +19,8 @@ public:
void setProgress(int p) {
setValue(p);
}
void setDeviceName(const QString& d);
void setDeviceName(const QString& device);
protected:
void closeEvent(QCloseEvent* e) override;

View File

@ -162,6 +162,7 @@ void SizeDialogBase::setupConnections()
connect(&dialogWidget().partResizerWidget(), &PartResizerWidget::firstSectorChanged, this, &SizeDialogBase::onResizerWidgetFirstSectorChanged);
connect(&dialogWidget().partResizerWidget(), &PartResizerWidget::lastSectorChanged, this, &SizeDialogBase::onResizerWidgetLastSectorChanged);
// TODO: Qt6 remove qOverload
connect(&dialogWidget().spinFreeBefore(), qOverload<double>(&QDoubleSpinBox::valueChanged), this, &SizeDialogBase::onSpinFreeBeforeChanged);
connect(&dialogWidget().spinFreeAfter(), qOverload<double>(&QDoubleSpinBox::valueChanged), this, &SizeDialogBase::onSpinFreeAfterChanged);
connect(&dialogWidget().spinCapacity(), qOverload<double>(&QDoubleSpinBox::valueChanged), this, &SizeDialogBase::onSpinCapacityChanged);
@ -305,7 +306,7 @@ void SizeDialogBase::onSpinFreeAfterChanged(double newAfter)
updateSpinFreeAfter(dialogUnitToSectors(device(), oldAfter));
}
void SizeDialogBase::onSpinFirstSectorChanged(qint64 newFirst)
void SizeDialogBase::onSpinFirstSectorChanged(double newFirst)
{
if (newFirst >= minimumFirstSector() && dialogWidget().partResizerWidget().updateFirstSector(newFirst))
setDirty();
@ -315,7 +316,7 @@ void SizeDialogBase::onSpinFirstSectorChanged(qint64 newFirst)
updateSpinFirstSector(partition().firstSector());
}
void SizeDialogBase::onSpinLastSectorChanged(qint64 newLast)
void SizeDialogBase::onSpinLastSectorChanged(double newLast)
{
if (newLast <= maximumLastSector() && dialogWidget().partResizerWidget().updateLastSector(newLast))
setDirty();

View File

@ -117,8 +117,8 @@ protected:
void onSpinFreeBeforeChanged(double newBefore);
void onSpinFreeAfterChanged(double newAfter);
void onSpinFirstSectorChanged(qint64 newFirst);
void onSpinLastSectorChanged(qint64 newLast);
void onSpinFirstSectorChanged(double newFirst);
void onSpinLastSectorChanged(double newLast);
void onAlignToggled(bool);
void onLVNameChanged(const QString& newName);

View File

@ -22,6 +22,7 @@ class SizeDialogWidget : public QWidget, public Ui::SizeDialogWidgetBase
public:
SizeDialogWidget(QWidget* parent) : QWidget(parent), Ui::SizeDialogWidgetBase() {
setupUi(this);
hidePosixPermissions();
}
public:
@ -73,6 +74,11 @@ public:
return *m_RadioLogical;
}
QRadioButton& radioRootPermissions() {
Q_ASSERT(m_permissionOnlyRoot);
return *m_permissionOnlyRoot;
}
QComboBox& comboFileSystem() {
Q_ASSERT(m_ComboFileSystem);
return *m_ComboFileSystem;
@ -141,6 +147,21 @@ public:
delete m_LabelTextNoSetLabel;
m_LabelTextNoSetLabel = nullptr;
}
void hidePosixPermissions() {
m_groupBox_permissions->hide();
m_labelPermission->hide();
}
void showPosixPermissions() {
m_groupBox_permissions->show();
m_labelPermission->show();
}
bool isPermissionOnlyRoot() const {
return !m_permissionEveryone->isChecked();
}
void hideBeforeAndAfter() {
labelFreeBefore().hide();
spinFreeBefore().hide();

View File

@ -18,22 +18,19 @@ SPDX-License-Identifier: GPL-3.0-or-later
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="11" column="0">
<widget class="QLabel" name="m_LabelFreeBefore">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>3</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<item row="0" column="0" colspan="2">
<widget class="PartResizerWidget" name="m_PartResizerWidget" native="true">
<property name="minimumSize">
<size>
<width>400</width>
<height>60</height>
</size>
</property>
<property name="text">
<string comment="@label:listbox">F&amp;ree space before:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>m_SpinFreeBefore</cstring>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>60</height>
</size>
</property>
</widget>
</item>
@ -53,13 +50,19 @@ SPDX-License-Identifier: GPL-3.0-or-later
</property>
</spacer>
</item>
<item row="12" column="1">
<widget class="FormattedSpinBox" name="m_SpinCapacity">
<property name="minimum">
<double>0.000000000000000</double>
<item row="2" column="0">
<widget class="QLabel" name="m_LabelRole">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<double>999999999.000000000000000</double>
<property name="text">
<string comment="@label:listbox">Partition type:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
@ -82,6 +85,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QComboBox" name="m_ComboFileSystem"/>
</item>
</layout>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="m_CheckBoxEncrypt">
<property name="toolTip">
@ -92,55 +102,40 @@ SPDX-License-Identifier: GPL-3.0-or-later
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item row="5" column="0" colspan="2">
<widget class="KNewPasswordWidget" name="m_EditPassphrase"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="m_LabelTextLVName">
<property name="text">
<string comment="@label">Maximum size:</string>
<string>Logical Volume Name:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QLabel" name="m_LabelMaxSize">
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
<item row="6" column="1">
<widget class="QLineEdit" name="m_EditLVName">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QRadioButton" name="m_RadioPrimary">
<property name="text">
<string>Primar&amp;y</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="m_RadioExtended">
<property name="text">
<string>E&amp;xtended</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="m_RadioLogical">
<property name="text">
<string>&amp;Logical</string>
</property>
</widget>
</item>
</layout>
<item row="7" column="0">
<widget class="QLabel" name="m_LabelTextLabel">
<property name="text">
<string comment="@label">Label:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>m_EditLabel</cstring>
</property>
</widget>
</item>
<item row="8" column="1">
<item row="7" column="1">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLineEdit" name="m_EditLabel"/>
@ -157,62 +152,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
</item>
</layout>
</item>
<item row="0" column="0" colspan="2">
<widget class="PartResizerWidget" name="m_PartResizerWidget" native="true">
<property name="minimumSize">
<size>
<width>400</width>
<height>60</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>60</height>
</size>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QComboBox" name="m_ComboFileSystem"/>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="m_LabelRole">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string comment="@label:listbox">Partition &amp;type:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>m_RadioPrimary</cstring>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="m_LabelTextLabel">
<property name="text">
<string comment="@label">Label:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>m_EditLabel</cstring>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
@ -228,7 +168,56 @@ SPDX-License-Identifier: GPL-3.0-or-later
</property>
</widget>
</item>
<item row="11" column="1">
<item row="8" column="1">
<widget class="QLabel" name="m_LabelMinSize">
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string comment="@label">Maximum size:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QLabel" name="m_LabelMaxSize">
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="m_LabelFreeBefore">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>3</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string comment="@label:listbox">F&amp;ree space before:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>m_SpinFreeBefore</cstring>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="FormattedSpinBox" name="m_SpinFreeBefore">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
@ -244,7 +233,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
</property>
</widget>
</item>
<item row="12" column="0">
<item row="11" column="0">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
@ -263,7 +252,17 @@ SPDX-License-Identifier: GPL-3.0-or-later
</property>
</widget>
</item>
<item row="13" column="0">
<item row="11" column="1">
<widget class="FormattedSpinBox" name="m_SpinCapacity">
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>999999999.000000000000000</double>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QLabel" name="m_LabelFreeAfter">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
@ -282,7 +281,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
</property>
</widget>
</item>
<item row="13" column="1">
<item row="12" column="1">
<widget class="FormattedSpinBox" name="m_SpinFreeAfter">
<property name="minimum">
<double>0.000000000000000</double>
@ -292,6 +291,16 @@ SPDX-License-Identifier: GPL-3.0-or-later
</property>
</widget>
</item>
<item row="13" column="0">
<widget class="QLabel" name="m_labelPermission">
<property name="text">
<string>Permissions</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="14" column="0" colspan="2">
<spacer name="verticalSpacer_2">
<property name="orientation">
@ -308,36 +317,67 @@ SPDX-License-Identifier: GPL-3.0-or-later
</property>
</spacer>
</item>
<item row="5" column="0" colspan="2">
<widget class="KNewPasswordWidget" name="m_EditPassphrase"/>
</item>
<item row="9" column="1">
<widget class="QLabel" name="m_LabelMinSize">
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
<item row="13" column="1">
<widget class="QGroupBox" name="m_groupBox_permissions">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QRadioButton" name="m_permissionEveryone">
<property name="toolTip">
<string>Allow everyone to write and read on this device</string>
</property>
<property name="text">
<string>Everyone</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="m_permissionOnlyRoot">
<property name="toolTip">
<string>Allow only root to write and read on this device, you will need to setup per-folder permissions</string>
</property>
<property name="text">
<string>Only Root</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="m_LabelTextLVName">
<property name="text">
<string>Logical Volume Name:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="m_EditLVName">
<property name="enabled">
<bool>true</bool>
</property>
<item row="2" column="1">
<widget class="QGroupBox" name="m_groupBox_type">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QRadioButton" name="m_RadioPrimary">
<property name="text">
<string>Primar&amp;y</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="m_RadioExtended">
<property name="text">
<string>E&amp;xtended</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="m_RadioLogical">
<property name="text">
<string>&amp;Logical</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KNewPasswordWidget</class>
<extends>QWidget</extends>
<header>knewpasswordwidget.h</header>
</customwidget>
<customwidget>
<class>PartResizerWidget</class>
<extends>QWidget</extends>
@ -349,16 +389,14 @@ SPDX-License-Identifier: GPL-3.0-or-later
<extends>QDoubleSpinBox</extends>
<header>gui/formattedspinbox.h</header>
</customwidget>
<customwidget>
<class>KNewPasswordWidget</class>
<extends>QLineEdit</extends>
<header>KNewPasswordWidget</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>m_RadioPrimary</tabstop>
<tabstop>m_RadioExtended</tabstop>
<tabstop>m_RadioLogical</tabstop>
<tabstop>m_ComboFileSystem</tabstop>
<tabstop>m_CheckBoxEncrypt</tabstop>
<tabstop>m_EditLVName</tabstop>
<tabstop>m_EditLabel</tabstop>
<tabstop>m_SpinFreeBefore</tabstop>
<tabstop>m_SpinCapacity</tabstop>

View File

@ -16,6 +16,7 @@
#include <QApplication>
#include <QCommandLineParser>
#include <QCommandLineOption>
#include <KAboutData>
#include <KCrash>
@ -24,6 +25,45 @@
#include <KLocalizedString>
#include <config.h>
#include <utility>
std::pair<QString, QString> parseDevice(const QString& selectedDevice)
{
QString device;
QString partitionNr;
if (selectedDevice.length()) {
const bool isNvme = selectedDevice.startsWith(QStringLiteral("nvme"));
// calculate the number of numbers on the last part of the info.
int numSize = 0;
for (int i = selectedDevice.length() - 1; i > 0; i--) {
if (selectedDevice[i].isNumber()) {
numSize += 1;
} else {
if (isNvme) {
// the entry is just an nvme without a partition.
if (selectedDevice[i] != QLatin1Char('p')) {
numSize = 0;
break;
}
}
break;
}
}
partitionNr = selectedDevice.mid(selectedDevice.length() - numSize);
if (numSize != 0) {
// nvme has a `p` that also needs to be removed.
if (isNvme) {
numSize += 1;
}
device = selectedDevice.mid(0, selectedDevice.length() - numSize);
} else {
device = selectedDevice;
}
}
return {device, partitionNr};
}
int Q_DECL_IMPORT main(int argc, char* argv[])
{
@ -52,12 +92,16 @@ int Q_DECL_IMPORT main(int argc, char* argv[])
aboutData.setHomepage(QStringLiteral("https://www.kde.org/applications/system/partitionmanager"));
KAboutData::setApplicationData(aboutData);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
#endif
KCrash::initialize();
QCommandLineParser parser;
aboutData.setupCommandLine(&parser);
// FIXME parser.addPositionalArgument(QStringLiteral("device"), xi18nc("@info:shell", "Device(s) to manage"), QStringLiteral("[device...]"));
QCommandLineOption deviceOption({QStringLiteral("device")}, xi18nc("@info:shell", "Device to manage"), QStringLiteral("device"));
parser.addOption(deviceOption);
parser.process(app);
aboutData.processCommandLine(&parser);
@ -71,8 +115,27 @@ int Q_DECL_IMPORT main(int argc, char* argv[])
if (!loadBackend())
return 0;
// device is the selected device minus the partition number.
// we need all of them to select properly the things on screen.
QString selectedDevice = parser.value(deviceOption);
if (selectedDevice.startsWith(QStringLiteral("/dev/"))) {
selectedDevice.remove(QStringLiteral("/dev/"));
}
auto [device, partitionNr] = parseDevice(selectedDevice);
MainWindow* mainWindow = new MainWindow();
Q_UNUSED(mainWindow)
QObject::connect(mainWindow, &MainWindow::scanFinished, mainWindow, [mainWindow, device = device, selectedDevice, partitionNr = partitionNr] {
if (device.length()) {
mainWindow->setCurrentDeviceByName(device);
if (partitionNr.length()) {
mainWindow->setCurrentPartitionByName(selectedDevice);
}
mainWindow->setDisallowOtherDevices();
} else {
mainWindow->showDevicePanelIfPreviouslyHiddenByDisallowOtherDevices();
}
});
return app.exec();
}

View File

@ -0,0 +1,26 @@
[Desktop Entry]
X-KDE-Solid-Predicate=[ StorageVolume.ignored == false AND StorageVolume.usage == 'FileSystem' ]
Type=Service
Actions=open;
[Desktop Action open]
# %f gives StorageAccess.filePath, %d gives Block.device, %i gives UDI
Exec=partitionmanager "--device=%d"
Icon=partitionmanager
Name=Reformat or Edit with Partition Manager
Name[az]=Bölmələr Meneceri ilə yenidən formatlayın və ya düzəliş edin
Name[ca]=Reformatació i edició amb el gestor de particions
Name[ca@valencia]=Reformatació i edició amb el gestor de particions
Name[cs]=Přeformátovat nebo upravit pomocí Správce diskových oddílů
Name[es]=Volver a formatear o editar con el gestor de particiones
Name[fr]=Reformater ou modifier avec le gestionnaire de partitions de KDE
Name[hu]=Újraformázás vagy szerkesztés a Partíciókezelővel
Name[ia]=Reformatta o modifica con Partition Manager (gerente de partition)
Name[it]=Riformatta o modifica con il gestore delle partizioni
Name[nl]=Met Partitiebeheerder opnieuw formatteren of bewerken
Name[pl]=Przeformatuj lub zmień w Zarządzaniu Partycjami
Name[pt_BR]=Reformatar ou editar com o gerenciador de partições
Name[sl]=Ponovno formatiraj ali uredi z Upravljalnikom razdelkov
Name[sv]=Omformatering eller redigering med partitionshanterare
Name[uk]=Переформатувати або редагувати за допомогою «Керування розділами»
Name[x-test]=xxReformat or Edit with Partition Managerxx

View File

@ -27,6 +27,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<name xml:lang="fr">Gestionnaire de partitions de KDE</name>
<name xml:lang="gl">Xestor de particións de KDE</name>
<name xml:lang="hu">KDE partíciókezelő</name>
<name xml:lang="ia">KDE Partition Manager (gerente de partition de KDE)</name>
<name xml:lang="id">KDE Partition Manager</name>
<name xml:lang="it">Gestore delle partizioni di KDE</name>
<name xml:lang="ko">KDE 파티션 관리자</name>
@ -51,6 +52,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<name xml:lang="zh-CN">KDE 分区管理器</name>
<name xml:lang="zh-TW">KDE 磁碟分割區管理員</name>
<summary>Manage disk devices, partitions and file systems on your computer</summary>
<summary xml:lang="ast">Xestiona preseos d'almacenamientu, particiones y sistemes de ficheros del ordenador</summary>
<summary xml:lang="az">Kompyuterinizdəki disk qurğularının, bölmələrin və fayl sistemlərinin idarə edilməsi</summary>
<summary xml:lang="ca">Gestiona dispositius de disc, particions i sistemes de fitxers de l'ordinador</summary>
<summary xml:lang="ca-valencia">Gestiona dispositius de disc, particions i sistemes de fitxers de l'ordinador</summary>
@ -64,9 +66,14 @@ SPDX-License-Identifier: GPL-3.0-or-later
<summary xml:lang="eu">Kudeatu zure sistemako disko gailuak, partizioak eta fitxategi-sistemak</summary>
<summary xml:lang="fi">Hallitse tietokoneen levyjä, osioita ja tiedostojärjestelmiä</summary>
<summary xml:lang="fr">Gérez vos disques, partitions et systèmes de fichiers de votre ordinateur</summary>
<summary xml:lang="hu">A számítógépe háttértárainak, partícióinak és fájlrendszereinek kezelése</summary>
<summary xml:lang="ia">Gere dispositivos de disco, partitiones e systemas de file sur tu computator</summary>
<summary xml:lang="id">Kelola perangkat disk, partisi, dan sistem file di komputermu</summary>
<summary xml:lang="it">Gestisci dispositivi a disco, partizioni e file system sul tuo computer</summary>
<summary xml:lang="ko">컴퓨터의 디스크 장치, 파티션, 파일 시스템 관리</summary>
<summary xml:lang="nl">Schijfapparaten, partities en bestandssystemen op uw computer beheren</summary>
<summary xml:lang="pa">ਆਪਣੇ ਕੰਪਿਊਟਰ ਲਈ ਡਿਸਕ ਡਿਵਾਈਸ, ਪਾਰਟੀਸ਼ਨ ਤੇ ਫਾਇਲ ਸਿਸਟਮਾਂ ਦਾ ਇੰਤਜ਼ਾਮ ਕਰੋ</summary>
<summary xml:lang="pl">Zarządzaj urządzeniami dyskowymi, partycjami oraz systemami plików na twoim komputerze</summary>
<summary xml:lang="pt">Faz a gestão de dispositivos, partições e sistemas de ficheiros dos discos no seu computador</summary>
<summary xml:lang="pt-BR">Gerencie dispositivos de disco, partições e sistemas de arquivos no seu computador</summary>
<summary xml:lang="ro">Gestionează discuri, partiții și sisteme de fișiere din calculator</summary>
@ -95,7 +102,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<p xml:lang="fr">Le gestionnaire de partitions de KDE est un utilitaire qui vous aide à gérer les disques, partitions et systèmes de fichiers de votre ordinateur. Il vous permet de créer, copier, déplacer, supprimer, redimensionner sans perte, sauvegarder et rétablir des partitions facilement.</p>
<p xml:lang="gl">O xestor de particións de KDE é unha ferramenta que lle permite xestionar os seus dispositivos de almacenamento, as particións e os sistemas de ficheiros do seu computador. A ferramenta permite crear, copiar, mover, eliminar, cambiar de tamaño sen perder datos, facer copias de seguranza e restaurar particións, todo de maneira sinxela.</p>
<p xml:lang="hu">A KDE partíciókezelő egy segédprogram, mely segít Önnek lemezek, partíciók és fájlrendszerek kezelésében. Lehetővé teszi partíciók létrehozását, másolását, mozgatását, törlését, adatvesztés nélküli átméretezését, biztonsági mentését és visszaállítását.</p>
<p xml:lang="id">KDE Partition Manager adalah sebuah program utilitas untuk membantu Anda mengelola perangkat disk, partisi dan sistem file di komputer Anda. Hal ini memungkinkan Anda untuk mudah menciptakan, menyalin, memindah, menghapus, mengubah-ukuran tanpa kehilangan data, mencadang dan mengembalikan partisi.</p>
<p xml:lang="id">KDE Partition Manager adalah sebuah program utilitas untuk membantu kamu mengelola perangkat disk, partisi dan sistem file di komputermu. Hal ini memungkinkan kamu untuk mudah menciptakan, menyalin, memindah, menghapus, mengubah ukuran tanpa kehilangan data, mem-backup dan mengembalikan partisi.</p>
<p xml:lang="it">Il gestore delle partizioni di KDE è un programma che ti aiuta a gestire i dischi, le partizioni e i filesystem sul tuo computer. Ti consente di creare, copiare, spostare, eliminare, ridimensionare senza perdere dati, effettuare copie di sicurezza e ripristinare partizioni con grande semplicità.</p>
<p xml:lang="ko">KDE 파티션 관리자는 컴퓨터의 디스크 장치, 파티션, 파일 시스템을 관리하는 도구입니다. 파티션 작업, 무손실 크기 조정, 백업과 복원이 가능합니다.</p>
<p xml:lang="lt">KDE Skaidinių tvarkyklė yra programa padedanti tvarkyti jūsų kompiuterio diskų įrenginius, skaidinius ir failų sistemas. Ji leidžia lengvai kurti, kopijuoti, perkelti, trinti ir keisti dydį neprarandant duomenų, kurti atsargines skaidinių kopijas.</p>
@ -137,6 +144,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<p xml:lang="fr">Fonctionnalités :</p>
<p xml:lang="gl">Funcionalidades:</p>
<p xml:lang="hu">Szolgáltatások:</p>
<p xml:lang="ia">Characteristicas:</p>
<p xml:lang="id">Fitur:</p>
<p xml:lang="it">Funzionalità:</p>
<p xml:lang="ko">기능:</p>
@ -218,6 +226,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<li xml:lang="fr">Utilise des programmes externes existants pour faire le travail</li>
<li xml:lang="gl">Usa programas externos para realizar as tarefas.</li>
<li xml:lang="hu">A meglévő külső programokat használja a feladatok elvégzésére</li>
<li xml:lang="ia">Face uso de programmas externe jam disponibile pro obtener que su carga es facite</li>
<li xml:lang="id">Membuat penggunaan program eksternal yang sudah ada untuk menyelesaikan pekerjaannya</li>
<li xml:lang="it">Utilizza programmi esterni già disponibili per fare il suo lavoro</li>
<li xml:lang="ko">외부 프로그램을 사용한 작업 관리</li>
@ -243,7 +252,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<li xml:lang="zh-TW">利用已有的外部程式來完成其工作</li>
</ul>
</description>
<url type="homepage">https://www.kde.org/applications/system/kdepartitionmanager/</url>
<url type="homepage">https://apps.kde.org/partitionmanager//</url>
<url type="bugtracker">https://bugs.kde.org/enter_bug.cgi?format=guided&amp;product=partitionmanager</url>
<url type="help">https://docs.kde.org/?application=partitionmanager</url>
<screenshots>
@ -255,4 +264,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
<provides>
<binary>partitionmanager</binary>
</provides>
<releases>
<release version="21.12.2" date="2022-02-03"/>
<release version="21.12.1" date="2022-01-06"/>
<release version="21.12.0" date="2021-12-09"/>
<release version="21.08.3" date="2021-11-04"/>
</releases>
</component>

View File

@ -21,6 +21,7 @@ Name[fr]=Gestionnaire de partitions de KDE
Name[ga]=Bainisteoir Deighiltí KDE
Name[gl]=Xestor de particións de KDE
Name[hu]=KDE partíciókezelő
Name[ia]=KDE Partition Manager (gerente de partition de KDE)
Name[id]=KDE Partition Manager
Name[it]=Gestore delle partizioni di KDE
Name[ja]=KDE パーティションマネージャ
@ -75,6 +76,7 @@ GenericName[fr]=Éditeur de partitions
GenericName[ga]=Eagarthóir Deighiltí
GenericName[gl]=Editor de particións
GenericName[hu]=Partíciószerkesztő
GenericName[ia]=Partition Editor (Editor de Partition)
GenericName[id]=Pengedit Partisi
GenericName[it]=Editor delle partizioni
GenericName[ja]=パーティション編集ツール
@ -128,6 +130,7 @@ Comment[fr]=Gère les disques, partitions et systèmes de fichiers
Comment[ga]=Bainistigh dioscaí, deighiltí agus córais comhad
Comment[gl]=Xestiona os discos, particións e o sistemas de ficheiros
Comment[hu]=Lemezek, partíciók, és fájlrendszerek kezelése
Comment[ia]=Gere discos, partitiones e systemas de file
Comment[id]=Kelola disk, partisi dan sistem file
Comment[it]=Gestisci dischi, partizioni e filesystem
Comment[ja]=ディスク、パーティション、ファイルシステムを管理します
@ -166,13 +169,14 @@ Icon=partitionmanager
Categories=System;Filesystem;KDE;Qt;
X-KDE-StartupNotify=true
Keywords=partition;disk;
Keywords[ar]=أقسام;قرص;
Keywords[ast]=partición;particionar;discu;
Keywords[az]=partition;disk;bölmə;
Keywords[ca]=partició;disc;
Keywords[ca@valencia]=partició;disc;
Keywords[cs]=oddíl;disk;
Keywords[da]=partition;disk;
Keywords[de]=partition;disk;festplatte
Keywords[de]=partition;disk;festplatte;
Keywords[el]=κατάτμηση;δίσκος;
Keywords[en_GB]=partition;disk;
Keywords[es]=partición;disco;
@ -181,6 +185,8 @@ Keywords[eu]=partizioa;diskoa;
Keywords[fi]=osio;levy;
Keywords[fr]=partition;disque;
Keywords[gl]=partition;disk;partición;disco;
Keywords[hu]=partíció;lemez;
Keywords[ia]=partition;disk;
Keywords[id]=partisi;disk;
Keywords[it]=partizione;disco;
Keywords[ko]=partition;disk;파티션;디스크;

View File

@ -145,7 +145,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<label context="@label">Backend plugin</label>
</entry>
<entry key="defaultFileSystem" type="Int">
<default>static_cast&lt;int&gt;(FileSystem::Type::Ext4)</default>
<default>static_cast&lt;int&gt;(FileSystem::Type::Btrfs)</default>
</entry>
<entry key="preferredUnit" type="Enum">
<label context="@label">Preferred unit:</label>
@ -167,5 +167,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
</choices>
<default>random</default>
</entry>
<entry key="hideDeviceDockWidgetByCmdArgs" type="Bool">
<default>false</default>
</entry>
</group>
</kcfg>