commit kcolorchooser for openSUSE:Factory
Hello community, here is the log from the commit of package kcolorchooser for openSUSE:Factory checked in at 2016-05-31 12:21:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kcolorchooser (Old) and /work/SRC/openSUSE:Factory/.kcolorchooser.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "kcolorchooser" Changes: -------- --- /work/SRC/openSUSE:Factory/kcolorchooser/kcolorchooser.changes 2016-03-26 15:14:22.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kcolorchooser.new/kcolorchooser.changes 2016-05-31 12:21:42.000000000 +0200 @@ -1,0 +2,24 @@ +Sat May 7 10:20:09 UTC 2016 - tittiatcoke@gmail.com + +- Update to KDE Applications 16.04.1 + * KDE Applications 16.04.1 + * https://www.kde.org/announcements/announce-applications-16.04.1.php + + +------------------------------------------------------------------- +Sun Apr 17 05:58:42 UTC 2016 - tittiatcoke@gmail.com + +- Update to KDE Applications 16.04.0 + * KDE Applications 16.04.0 + * https://www.kde.org/announcements/announce-applications-16.04.0.php + + +------------------------------------------------------------------- +Mon Apr 11 06:35:53 UTC 2016 - tittiatcoke@gmail.com + +- Update to KDE Applications 16.03.90 + * KDE Applications 16.04.0 RC + * https://www.kde.org/announcements/announce-applications-16.04-rc.php + + +------------------------------------------------------------------- Old: ---- kcolorchooser-15.12.3.tar.xz New: ---- kcolorchooser-16.04.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kcolorchooser.spec ++++++ --- /var/tmp/diff_new_pack.cDBh6f/_old 2016-05-31 12:21:43.000000000 +0200 +++ /var/tmp/diff_new_pack.cDBh6f/_new 2016-05-31 12:21:43.000000000 +0200 @@ -17,20 +17,24 @@ Name: kcolorchooser -Version: 15.12.3 +Version: 16.04.1 Release: 0 Summary: Color Chooser License: MIT Group: Productivity/Graphics/Other Url: http://www.kde.org Source0: %{name}-%{version}.tar.xz -BuildRequires: libkde4-devel +BuildRequires: extra-cmake-modules BuildRequires: oxygen-icon-theme-large BuildRequires: xz -Provides: kde4-kcolorchooser = 4.3.0 -Obsoletes: kde4-kcolorchooser < 4.3.0 +BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5Gui) +BuildRequires: pkgconfig(Qt5Widgets) +BuildRequires: ki18n-devel +BuildRequires: kwidgetsaddons-devel +BuildRequires: kxmlgui-devel +BuildRequires: update-desktop-files BuildRoot: %{_tmppath}/%{name}-%{version}-build -%kde4_runtime_requires %description This is an color chooser application for KDE. @@ -39,14 +43,12 @@ %setup -q -n %{name}-%{version} %build - %cmake_kde4 -d build + %cmake_kf5 -d build %make_jobs %install - cd build - %kde4_makeinstall + %kf5_makeinstall -C build %suse_update_desktop_file -r kcolorchooser Utility DesktopUtility - %kde_post_install %post -p /sbin/ldconfig @@ -54,8 +56,8 @@ %files %defattr(-,root,root) -%_kde4_bindir/kcolorchooser -%_kde4_applicationsdir/kcolorchooser.desktop +%_bindir/kcolorchooser +%_kf5_applicationsdir/kcolorchooser.desktop %{_datadir}/icons/hicolor/*/apps/kcolorchooser.png %changelog ++++++ kcolorchooser-15.12.3.tar.xz -> kcolorchooser-16.04.1.tar.xz ++++++ Files old/kcolorchooser-15.12.3/16-apps-kcolorchooser.png and new/kcolorchooser-16.04.1/16-apps-kcolorchooser.png differ Files old/kcolorchooser-15.12.3/22-apps-kcolorchooser.png and new/kcolorchooser-16.04.1/22-apps-kcolorchooser.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcolorchooser-15.12.3/CMakeLists.txt new/kcolorchooser-16.04.1/CMakeLists.txt --- old/kcolorchooser-15.12.3/CMakeLists.txt 2015-07-28 13:26:49.000000000 +0200 +++ new/kcolorchooser-16.04.1/CMakeLists.txt 2016-03-09 10:16:01.000000000 +0100 @@ -1,25 +1,41 @@ -cmake_minimum_required(VERSION 2.8.9) -project(kcolorchooser) +cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) +if(POLICY CMP0063) + cmake_policy(SET CMP0063 NEW) +endif() -# search packages used by KDE -find_package(KDE4 REQUIRED) -include(KDE4Defaults) -include(MacroLibrary) -include(MacroOptionalAddSubdirectory) +project(kcolorchooser) -add_definitions (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS}) -include_directories (${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES}) +set (QT_MIN_VERSION "5.2.0") -set(kcolorchooser_SRCS kcolorchooser.cpp ) +find_package(ECM 1.7.0 REQUIRED NO_MODULE) +set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) -kde4_add_app_icon(kcolorchooser_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/hi*-app-kcolorchooser.png") +include(ECMInstallIcons) +include(ECMAddAppIcon) +include(KDEInstallDirs) +include(KDECompilerSettings) +include(KDECMakeSettings) + +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + Core + Gui + Widgets) +find_package(KF5 REQUIRED COMPONENTS + I18n + WidgetsAddons + XmlGui) -kde4_add_executable(kcolorchooser ${kcolorchooser_SRCS}) +set(kcolorchooser_SRCS kcolorchooser.cpp ) -target_link_libraries(kcolorchooser ${KDE4_KDEUI_LIBS}) +add_executable(kcolorchooser ${kcolorchooser_SRCS}) -install(TARGETS kcolorchooser ${INSTALL_TARGETS_DEFAULT_ARGS} ) -install( PROGRAMS kcolorchooser.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) +target_link_libraries(kcolorchooser Qt5::Gui KF5::I18n KF5::WidgetsAddons KF5::XmlGui) -kde4_install_icons( ${ICON_INSTALL_DIR} ) +install(TARGETS kcolorchooser ${INSTALL_TARGETS_DEFAULT_ARGS}) +install(PROGRAMS kcolorchooser.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) +ecm_install_icons(ICONS + 16-apps-kcolorchooser.png + 22-apps-kcolorchooser.png + DESTINATION ${KDE_INSTALL_ICONDIR} + THEME hicolor) Files old/kcolorchooser-15.12.3/hi16-app-kcolorchooser.png and new/kcolorchooser-16.04.1/hi16-app-kcolorchooser.png differ Files old/kcolorchooser-15.12.3/hi22-app-kcolorchooser.png and new/kcolorchooser-16.04.1/hi22-app-kcolorchooser.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kcolorchooser-15.12.3/kcolorchooser.cpp new/kcolorchooser-16.04.1/kcolorchooser.cpp --- old/kcolorchooser-15.12.3/kcolorchooser.cpp 2015-07-28 13:26:49.000000000 +0200 +++ new/kcolorchooser-16.04.1/kcolorchooser.cpp 2016-03-09 10:16:01.000000000 +0100 @@ -23,65 +23,83 @@ #include <iostream> -#include <kapplication.h> -#include <kcmdlineargs.h> -#include <kaboutdata.h> -#include <klocale.h> - -#include <kcolordialog.h> -#include <kcolormimedata.h> -#include <khelpmenu.h> - -#include <QtGui/QClipboard> +#include <QApplication> +#include <QClipboard> +#include <QColorDialog> +#include <QCommandLineParser> +#include <QDialogButtonBox> +#include <QMenu> +#include <QMimeData> +#include <QPushButton> +#include <QDebug> + +#include <KAboutData> +#include <KLocalizedString> +#include <KHelpMenu> static const char description[] = I18N_NOOP("KDE Color Chooser"); -static const char version[] = "v1.0.1"; +static const char version[] = "v2.0.0"; int main(int argc, char *argv[]) { - KAboutData aboutData("kcolorchooser", 0, ki18n("KColorChooser"), - version, ki18n(description), KAboutData::License_BSD, - ki18n("(c) 2000, Waldo Bastian")); - aboutData.addAuthor(ki18n("Waldo Bastian"),KLocalizedString(), "bastian@kde.org"); + QApplication app(argc, argv); + + KAboutData aboutData("kcolorchooser", i18n("KColorChooser"), + version, i18n(description), KAboutLicense::BSDL, + i18n("(c) 2000, Waldo Bastian")); + aboutData.addAuthor(i18n("Waldo Bastian"), QString(), "bastian@kde.org"); + aboutData.addAuthor(i18n("Hugo Parente Lima"),i18n("KF5 port"), "hugo.pl@gmail.com"); + aboutData.setTranslator(i18nc("NAME OF TRANSLATORS", "Your names"), i18nc("EMAIL OF TRANSLATORS", "Your emails")); aboutData.setProductName("kdelibs/kdeui"); - KCmdLineArgs::init( argc, argv, &aboutData ); + KLocalizedString::setApplicationDomain("kcolorchooser"); + KAboutData::setApplicationData(aboutData); - KCmdLineOptions options; - options.add("print", ki18n("Print the selected color to stdout")); - options.add("color <color>", ki18n("Set initially selected color")); - KCmdLineArgs::addCmdLineOptions( options ); - - KApplication app; - - KColorDialog dlg; - - KHelpMenu *help = new KHelpMenu(&dlg, &aboutData); - - QColor color = KColorMimeData::fromMimeData( QApplication::clipboard()->mimeData( QClipboard::Clipboard )); - if (!color.isValid()) { - color = Qt::blue; // Just a color - } - KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - if (args->isSet("color")) { - QColor c = QColor(args->getOption("color")); - if (c.isValid()) - color = c; - } - dlg.setButtons(KDialog::Help | KDialog::Close); - dlg.setButtonMenu(KDialog::Help, (QMenu *)(help->menu())); - dlg.setColor(color); - app.connect(&dlg, SIGNAL(finished()), SLOT(quit())); + QCommandLineParser parser; + parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions); + aboutData.setupCommandLine(&parser); + QCommandLineOption print("print", i18n("Print the selected color to stdout.")); + parser.addOption(print); + QCommandLineOption color("color", i18n("Set initially selected color."), "color"); + parser.addOption(color); + parser.process(app); + aboutData.processCommandLine(&parser); + + + QColorDialog dlg; + QDialogButtonBox *box = dlg.findChild<QDialogButtonBox*>(); + if (!box) + return 1; + + box->addButton(QDialogButtonBox::Help); + + KHelpMenu *help = new KHelpMenu(&dlg, aboutData); + QObject::connect(box, &QDialogButtonBox::helpRequested, [=] () { + QPushButton *button = box->button(QDialogButtonBox::Help); + QPoint pos = button->pos(); + pos.ry() += button->height(); + pos = box->mapToGlobal(pos); + help->menu()->exec(pos); + }); + + if (parser.isSet(color)) { + dlg.setCurrentColor(QColor(parser.value(color))); + } else { + const QMimeData* mimeData = QApplication::clipboard()->mimeData(QClipboard::Clipboard); + QColor clipboardColor = mimeData->colorData().value<QColor>(); + if (clipboardColor.isValid()) { + dlg.setCurrentColor(clipboardColor); + } + } dlg.show(); app.exec(); - const QColor c = dlg.color(); - if ( args->isSet("print") && c.isValid() ) { + const QColor c = dlg.currentColor(); + if (parser.isSet(print) && c.isValid()) { std::cout << c.name().toUtf8().constData() << std::endl; } - args->clear(); }
participants (1)
-
root@hilbert.suse.de