Commit cf6d9a38 authored by Sven Langkamp's avatar Sven Langkamp

build fixes for Krita, gmic currently disabled

parent ce8c7c98
......@@ -185,7 +185,7 @@ if(KF5_Activities_FOUND)
endif()
find_package(Qt5 5.2.0 REQUIRED COMPONENTS Core Gui Widgets Xml PrintSupport Script Svg Test Concurrent)
find_package(Qt5 5.2.0 COMPONENTS WebKit DBus Declarative)
find_package(Qt5 5.2.0 COMPONENTS WebKit DBus Declarative X11Extras)
set(QT_QTDBUS_FOUND ${Qt5DBus_FOUND})
set(QT_QTWEBKIT_FOUND ${Qt5WebKit_FOUND})
......
......@@ -92,7 +92,7 @@ calligra_define_product(APP_STAGE "Stage app (for Desktop)" UNPORTED REQUIRES P
calligra_define_product(APP_SHEETS "Sheets app (for Desktop)" UNPORTED REQUIRES PART_SHEETS)
calligra_define_product(APP_AUTHOR "Author app (for Desktop)" UNPORTED REQUIRES PART_WORDS)
calligra_define_product(APP_KARBON "Karbon app (for Desktop)" UNPORTED REQUIRES LIB_CALLIGRA)
calligra_define_product(APP_KRITA "Krita app (for Desktop)" UNPORTED REQUIRES LIB_CALLIGRA)
calligra_define_product(APP_KRITA "Krita app (for Desktop)" UNPORTED REQUIRES LIB_CALLIGRA)
calligra_define_product(APP_KEXI "Kexi app (for Desktop)" UNPORTED REQUIRES LIB_CALLIGRA)
calligra_define_product(APP_FLOW "Flow app (for Desktop)" UNPORTED REQUIRES LIB_CALLIGRA LIB_KOPAGEAPP)
calligra_define_product(APP_PLAN "Plan app (for Desktop)" UNPORTED REQUIRES LIB_CALLIGRA)
......
......@@ -23,6 +23,7 @@
#include <kis_types.h>
#include <QtTest>
#include <kis_paint_device.h>
class KisPaintDevice;
class KoColorSpace;
......
......@@ -22,6 +22,7 @@
#include <QtTest>
#include <kis_types.h>
#include <KoColor.h>
#include <kis_paint_device.h>
class KisPaintDevice;
class KoColorSpace;
......
......@@ -23,6 +23,7 @@
#include <kis_types.h>
#include <QtTest>
#include <kis_paint_device.h>
class KisPaintDevice;
class KoColorSpace;
......
......@@ -23,6 +23,7 @@
#include <kis_types.h>
#include <QtTest>
#include <kis_paint_device.h>
class KisPaintDevice;
class KoColorSpace;
......
......@@ -24,6 +24,8 @@
#include <KoColor.h>
#include <kis_painter.h>
#include <kis_paint_information.h>
#include <kis_image.h>
#include <kis_layer.h>
class KoColorSpace;
......
This diff is collapsed.
......@@ -24,6 +24,7 @@
#include "kis_layer.h"
#include "kis_types.h"
#include "kis_node_visitor.h"
#include "kis_image.h"
class TestLayer : public KisLayer
{
......
......@@ -22,6 +22,7 @@
#include <QtTest>
#include "kis_types.h"
#include "kis_image.h"
class KisNodeQueryPathTest : public QObject
{
......
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>
#include "kis_random_generator_demo.h"
......@@ -7,6 +7,10 @@
#include <ctime>
#include <cstdlib>
#include <QApplication>
#include <KAboutData>
#include <KLocalizedString>
#include <QCommandLineParser>
//BEGIN Noise
Noise::Noise(int wx, int wy) : _wx(wx), _wy(wy),
......@@ -138,14 +142,13 @@ void KisRandomGeneratorDemo::updateNoise()
int main(int argc, char **argv)
{
KAboutData about("kis_random_generator_demo", 0, ki18n("kis_random_generator_demo"), "0.2",
ki18n("Krita Random Generator demo/test application"),
KAboutData::License_GPL, ki18n("Copyright 2009 Matthew Woehlke"));
about.addAuthor( ki18n("Matthew Woehlke"), KLocalizedString(), "mw_triad@users.sourceforge.net" );
KCmdLineArgs::init(argc, argv, &about);
KApplication app;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
Q_UNUSED(args);
KAboutData about("kis_random_generator_demo", i18n("kis_random_generator_demo"), "0.2",
i18n("Krita Random Generator demo/test application"),
KAboutLicense::GPL_V2, i18n("Copyright 2009 Matthew Woehlke"));
about.addAuthor( i18n("Matthew Woehlke"), QString(), "mw_triad@users.sourceforge.net" );
QApplication app(argc, argv);
KAboutData::setApplicationData(about);
KisRandomGeneratorDemo *demo = new KisRandomGeneratorDemo;
demo->show();
......
......@@ -26,6 +26,7 @@
#include "kis_node_visitor.h"
#include "kis_paint_device.h"
#include "kis_merge_walker.h"
#include "kis_image.h"
class TestLayer : public KisLayer
{
......
......@@ -6,61 +6,61 @@ macro_add_unittest_definitions()
########### next target ###############
set(kis_tiled_data_manager_test_SRCS kis_tiled_data_manager_test.cpp )
kde4_add_unit_test(KisTiledDataManagerTest TESTNAME krita-image-KisTiledDataManagerTest ${kis_tiled_data_manager_test_SRCS})
target_link_libraries(KisTiledDataManagerTest ${KDE4_KDEUI_LIBS} kritaimage ${QT_QTTEST_LIBRARY})
target_link_libraries(KisTiledDataManagerTest ${KDE4_KDEUI_LIBS} kritaimage Qt5::Test)
########### next target ###############
set(kis_low_memory_tests_SRCS kis_low_memory_tests.cpp )
kde4_add_unit_test(KisLowMemoryTests TESTNAME krita-image-KisLowMemoryTests ${kis_low_memory_tests_SRCS})
target_link_libraries(KisLowMemoryTests ${KDE4_KDEUI_LIBS} kritaimage ${QT_QTTEST_LIBRARY})
target_link_libraries(KisLowMemoryTests ${KDE4_KDEUI_LIBS} kritaimage Qt5::Test)
set_tests_properties(krita-image-KisLowMemoryTests PROPERTIES TIMEOUT 180)
########### next target ###############
set(kis_tile_compressors_test_SRCS kis_tile_compressors_test.cpp )
kde4_add_unit_test(KisTileCompressorsTest TESTNAME krita-image-KisTileCompressorsTest ${kis_tile_compressors_test_SRCS})
target_link_libraries(KisTileCompressorsTest ${KDE4_KDEUI_LIBS} koodf kritaimage ${QT_QTTEST_LIBRARY})
target_link_libraries(KisTileCompressorsTest ${KDE4_KDEUI_LIBS} koodf kritaimage Qt5::Test)
########### next target ###############
set(kis_compression_tests_SRCS kis_compression_tests.cpp )
kde4_add_unit_test(KisCompressionTests TESTNAME krita-image-KisCompressionTests ${kis_compression_tests_SRCS})
target_link_libraries(KisCompressionTests ${KDE4_KDEUI_LIBS} kritaimage ${QT_QTTEST_LIBRARY})
target_link_libraries(KisCompressionTests ${KDE4_KDEUI_LIBS} kritaimage Qt5::Test)
########### next target ###############
set(kis_lockless_stack_test_SRCS kis_lockless_stack_test.cpp )
kde4_add_unit_test(KisLocklessStackTest TESTNAME krita-image-KisLocklessStackTest ${kis_lockless_stack_test_SRCS})
target_link_libraries(KisLocklessStackTest ${KDE4_KDEUI_LIBS} kritaimage ${QT_QTTEST_LIBRARY})
target_link_libraries(KisLocklessStackTest ${KDE4_KDEUI_LIBS} kritaimage Qt5::Test)
########### next target ###############
set(kis_memory_pool_test_SRCS kis_memory_pool_test.cpp )
kde4_add_unit_test(KisMemoryPoolTest TESTNAME krita-image-KisMemoryPoolTest ${kis_memory_pool_test_SRCS})
target_link_libraries(KisMemoryPoolTest ${KDE4_KDEUI_LIBS} ${QT_QTTEST_LIBRARY})
target_link_libraries(KisMemoryPoolTest ${KDE4_KDEUI_LIBS} Qt5::Test)
########### next target ###############
set(kis_chunk_allocator_test_SRCS kis_chunk_allocator_test.cpp ../swap/kis_chunk_allocator.cpp)
kde4_add_unit_test(KisChunkAllocatorTest TESTNAME krita-image-KisChunkAllocatorTest ${kis_chunk_allocator_test_SRCS})
target_link_libraries(KisChunkAllocatorTest ${KDE4_KDEUI_LIBS} ${QT_QTTEST_LIBRARY})
target_link_libraries(KisChunkAllocatorTest ${KDE4_KDEUI_LIBS} Qt5::Test)
########### next target ###############
set(kis_memory_window_test_SRCS kis_memory_window_test.cpp ../swap/kis_memory_window.cpp)
kde4_add_unit_test(KisMemoryWindowTest TESTNAME krita-image-KisMemoryWindowTest ${kis_memory_window_test_SRCS})
target_link_libraries(KisMemoryWindowTest ${KDE4_KDEUI_LIBS} ${QT_QTTEST_LIBRARY})
target_link_libraries(KisMemoryWindowTest ${KDE4_KDEUI_LIBS} Qt5::Test)
########### next target ###############
set(kis_swapped_data_store_test_SRCS kis_swapped_data_store_test.cpp ../kis_tile_data.cc)
kde4_add_unit_test(KisSwappedDataStoreTest TESTNAME krita-image-KisSwappedDataStoreTest ${kis_swapped_data_store_test_SRCS})
target_link_libraries(KisSwappedDataStoreTest ${KDE4_KDEUI_LIBS} kritaimage ${QT_QTTEST_LIBRARY} ${Boost_SYSTEM_LIBRARY})
target_link_libraries(KisSwappedDataStoreTest ${KDE4_KDEUI_LIBS} kritaimage Qt5::Test ${Boost_SYSTEM_LIBRARY})
########### next target ###############
set(kis_tile_data_store_test_SRCS kis_tile_data_store_test.cpp ../kis_tile_data.cc)
kde4_add_unit_test(KisTileDataStoreTest TESTNAME krita-image-KisTileDataStoreTest ${kis_tile_data_store_test_SRCS})
target_link_libraries(KisTileDataStoreTest ${KDE4_KDEUI_LIBS} kritaimage ${QT_QTTEST_LIBRARY} ${Boost_SYSTEM_LIBRARY})
target_link_libraries(KisTileDataStoreTest ${KDE4_KDEUI_LIBS} kritaimage Qt5::Test ${Boost_SYSTEM_LIBRARY})
########### next target ###############
set(kis_store_limits_test_SRCS kis_store_limits_test.cpp ../kis_tile_data.cc )
kde4_add_unit_test(KisStoreLimitsTest TESTNAME krita-image-KisStoreLimitsTest ${kis_store_limits_test_SRCS})
target_link_libraries(KisStoreLimitsTest ${KDE4_KDEUI_LIBS} kritaimage ${QT_QTTEST_LIBRARY} ${Boost_SYSTEM_LIBRARY})
target_link_libraries(KisStoreLimitsTest ${KDE4_KDEUI_LIBS} kritaimage Qt5::Test ${Boost_SYSTEM_LIBRARY})
########### next target ###############
set(kis_tile_data_pooler_test_SRCS kis_tile_data_pooler_test.cpp ../kis_tile_data.cc ../kis_tile_data_pooler.cc )
kde4_add_unit_test(KisTileDataPoolerTest TESTNAME krita-image-KisTileDataPoolerTest ${kis_tile_data_pooler_test_SRCS})
target_link_libraries(KisTileDataPoolerTest ${KDE4_KDEUI_LIBS} kritaimage ${QT_QTTEST_LIBRARY} ${Boost_SYSTEM_LIBRARY})
target_link_libraries(KisTileDataPoolerTest ${KDE4_KDEUI_LIBS} kritaimage Qt5::Test ${Boost_SYSTEM_LIBRARY})
......@@ -9,22 +9,22 @@ macro_add_unittest_definitions()
set(kis_auto_brush_test_SRCS kis_auto_brush_test.cpp )
kde4_add_unit_test(KisAutobrushTest TESTNAME krita-libbrush-KisAutobrushTest ${kis_auto_brush_test_SRCS})
target_link_libraries(KisAutobrushTest ${KDE4_KDEUI_LIBS} kritaimage kritalibbrush ${QT_QTTEST_LIBRARY})
target_link_libraries(KisAutobrushTest ${KDE4_KDEUI_LIBS} kritaimage kritalibbrush Qt5::Test)
########### next target ###############
set(kis_brush_test_SRCS kis_brush_test.cpp )
kde4_add_unit_test(KisBrushTest TESTNAME krita-libbrush-KisBrushTest ${kis_brush_test_SRCS})
target_link_libraries(KisBrushTest ${KDE4_KDEUI_LIBS} kritaimage kritalibbrush ${QT_QTTEST_LIBRARY})
target_link_libraries(KisBrushTest ${KDE4_KDEUI_LIBS} kritaimage kritalibbrush Qt5::Test)
########### next target ###############
set(kis_boundary_test_SRCS kis_boundary_test.cpp )
kde4_add_unit_test(KisBoundaryTest TESTNAME krita-libbrush-KisBoundaryTest ${kis_boundary_test_SRCS})
target_link_libraries(KisBoundaryTest ${KDE4_KDEUI_LIBS} kritaimage kritalibbrush ${QT_QTTEST_LIBRARY})
target_link_libraries(KisBoundaryTest ${KDE4_KDEUI_LIBS} kritaimage kritalibbrush Qt5::Test)
########### next target ###############
set(kis_imagepipe_brush_test_SRCS kis_imagepipe_brush_test.cpp )
kde4_add_unit_test(KisImagePipeBrushTest TESTNAME krita-libbrush-KisImagePipeBrushTest ${kis_imagepipe_brush_test_SRCS})
target_link_libraries(KisImagePipeBrushTest ${KDE4_KDEUI_LIBS} kritaimage kritalibbrush ${QT_QTTEST_LIBRARY})
target_link_libraries(KisImagePipeBrushTest ${KDE4_KDEUI_LIBS} kritaimage kritalibbrush Qt5::Test)
......@@ -20,5 +20,5 @@ add_subdirectory( layersplit )
# Allow to skip building GMIC plugin
option(WITH_GMIC "Build the G'Mic plugin" ON)
if(WITH_GMIC)
add_subdirectory( gmic )
# add_subdirectory( gmic )
endif()
......@@ -217,7 +217,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/keysym.h>
#include <fixx11h.h>
//#include <fixx11h.h>
#include <pthread.h>
#ifdef cimg_use_xshm
#include <sys/ipc.h>
......@@ -20,6 +20,7 @@
#include <QHash>
#include <QSet>
#include <QQueue>
#include <QString>
class QDomDocument;
class Command;
......
......@@ -25,9 +25,9 @@ set(kritagmic_parser_PART_SRCS
set(kis_gmic_tests_SRCS kis_gmic_tests.cpp ${kritagmic_parser_PART_SRCS})
kde4_add_unit_test(KisGmicTests TESTNAME krita-plugins-extensions-gmic-GmicTests ${kis_gmic_tests_SRCS})
target_link_libraries(KisGmicTests gmic kritaimage ${QT_QTTEST_LIBRARY} ${QT_QTXML_LIBRARY})
target_link_libraries(KisGmicTests gmic kritaimage Qt5::Test ${QT_QTXML_LIBRARY})
set(kis_gmic_benchmarks_SRCS kis_gmic_benchmarks.cpp ${kritagmic_parser_PART_SRCS})
calligra_add_benchmark(KisGmicBenchmark TESTNAME krita-plugins-extensions-gmic-GmicBenchmarks ${kis_gmic_benchmarks_SRCS})
target_link_libraries(KisGmicBenchmark gmic kritaimage ${QT_QTTEST_LIBRARY} ${QT_QTXML_LIBRARY})
target_link_libraries(KisGmicBenchmark gmic kritaimage Qt5::Test ${QT_QTXML_LIBRARY})
......@@ -7,10 +7,10 @@ macro_add_unittest_definitions()
set(kis_all_filter_test_SRCS kis_all_filter_test.cpp )
kde4_add_executable(KisAllFilterTest TEST ${kis_all_filter_test_SRCS})
target_link_libraries(KisAllFilterTest ${KDE4_KDEUI_LIBS} kritaimage ${QT_QTTEST_LIBRARY})
target_link_libraries(KisAllFilterTest ${KDE4_KDEUI_LIBS} kritaimage Qt5::Test)
########### next target ###############
set(kis_crash_filter_test_SRCS kis_crash_filter_test.cpp )
kde4_add_executable(KisCrashFilterTest TEST ${kis_crash_filter_test_SRCS})
target_link_libraries(KisCrashFilterTest ${KDE4_KDEUI_LIBS} kritaimage ${QT_QTTEST_LIBRARY})
target_link_libraries(KisCrashFilterTest ${KDE4_KDEUI_LIBS} kritaimage Qt5::Test)
......@@ -7,27 +7,27 @@ macro_add_unittest_definitions()
set(psd_header_test_SRCS psd_header_test.cpp ../psd_utils.cpp ../psd_header.cpp )
kde4_add_unit_test(psd_header_test TESTNAME krita-psd-psd_header_test ${psd_header_test_SRCS})
target_link_libraries(psd_header_test ${KDE4_KDEUI_LIBS} ${QT_QTTEST_LIBRARY})
target_link_libraries(psd_header_test ${KDE4_KDEUI_LIBS} Qt5::Test)
########### next target ###############
set(psd_utils_test_SRCS psd_utils_test.cpp ../psd_utils.cpp )
kde4_add_unit_test(psd_utils_test TESTNAME krita-psd-psd_utils_test ${psd_utils_test_SRCS})
target_link_libraries(psd_utils_test ${KDE4_KDEUI_LIBS} ${QT_QTTEST_LIBRARY})
target_link_libraries(psd_utils_test ${KDE4_KDEUI_LIBS} Qt5::Test)
########### next target ###############
set(psd_colormode_block_test_SRCS psd_colormode_block_test.cpp ../psd_colormode_block.cpp ../psd_header.cpp ../psd_utils.cpp)
kde4_add_unit_test(psd_colormode_block_test TESTNAME krita-psd-psd_colormode_block_test ${psd_colormode_block_test_SRCS})
target_link_libraries(psd_colormode_block_test ${KDE4_KDEUI_LIBS} ${QT_QTTEST_LIBRARY})
target_link_libraries(psd_colormode_block_test ${KDE4_KDEUI_LIBS} Qt5::Test)
########### next target ###############
set(compression_test_SRCS compression_test.cpp ../compression.cpp)
kde4_add_unit_test(compression_test TESTNAME krita-psd-compression_test ${compression_test_SRCS})
target_link_libraries(compression_test ${KDE4_KDEUI_LIBS} ${QT_QTTEST_LIBRARY})
target_link_libraries(compression_test ${KDE4_KDEUI_LIBS} Qt5::Test)
########### next target ###############
#set(kis_psd_test_SRCS kis_psd_test.cpp )
#kde4_add_unit_test(kis_psd_test TESTNAME krita-plugins-formats-psd_test ${kis_psd_test_SRCS})
#target_link_libraries(kis_psd_test ${KDE4_KDEUI_LIBS} kritaui ${QT_QTTEST_LIBRARY})
#target_link_libraries(kis_psd_test ${KDE4_KDEUI_LIBS} kritaui Qt5::Test)
......@@ -429,7 +429,7 @@ else()
endif ()
if(HAVE_OPENGL)
target_link_libraries(kritaui ${OPENGL_LIBRARIES} Qt5::OpenGL ${OPENEXR_LIBRARIES})
target_link_libraries(kritaui ${OPENGL_LIBRARIES} Qt5::OpenGL Qt5::X11Extras ${OPENEXR_LIBRARIES})
# activate workaround for the VSync disable
if(NOT WIN32)
......
......@@ -61,7 +61,7 @@ public:
{
}
QList<QWidget*> createItemWidgets() const
QList<QWidget*> createItemWidgets(const QModelIndex& index) const
{
// a lump of coal and a piece of elastic will get you through the world
QModelIndex idx = property("goya:creatingWidgetForIndex").value<QModelIndex>();
......
......@@ -486,11 +486,7 @@ public:
// this could maybe confuse some apps? So for now we'll just fallback to KIO::get
// and error again. Well, maybe this even helps with wrong stat results.
if (!job->error()) {
#if KDE_IS_VERSION(4,4,0)
const KUrl localUrl = static_cast<KIO::StatJob*>(job)->mostLocalUrl();
#else
const KUrl localUrl = static_cast<KIO::StatJob*>(job)->url();
#endif
if (localUrl.isLocalFile()) {
m_file = localUrl.toLocalFile();
openLocalFile();
......@@ -694,7 +690,7 @@ bool KisDocument::saveFile()
if (backupFile()) {
if (url().isLocalFile())
KSaveFile::backupFile(url().toLocalFile(), d->backupPath);
KBackup::backupFile(url().toLocalFile(), d->backupPath);
else {
KIO::UDSEntry entry;
if (KIO::NetAccess::stat(url(),
......
......@@ -63,7 +63,7 @@ KService::Ptr KisDocumentEntry::service() const {
* @return TRUE if the service pointer is null
*/
bool KisDocumentEntry::isEmpty() const {
return m_service.isNull();
return m_service == 0;
}
/**
......@@ -99,7 +99,7 @@ KisDocumentEntry KisDocumentEntry::queryByMimeType(const QString & mimetype)
if (vec.isEmpty()) {
// Still no match. Either the mimetype itself is unknown, or we have no service for it.
// Help the user debugging stuff by providing some more diagnostics
if (KServiceType::serviceType(mimetype).isNull()) {
if (KServiceType::serviceType(mimetype) == 0) {
kError(30003) << "Unknown Calligra MimeType " << mimetype << "." << endl;
kError(30003) << "Check your installation (for instance, run 'kde4-config --path mime' and check the result)." << endl;
} else {
......
......@@ -64,9 +64,9 @@
#include "KisView.h"
#include "kis_canvas_controller.h"
#ifdef HAVE_OPENGL
#include "opengl/kis_opengl_canvas2.h"
#include "opengl/kis_opengl_image_textures.h"
#ifdef HAVE_OPENGL
#include <QGLFormat>
#endif
......
......@@ -20,6 +20,8 @@
#include "kis_dlg_filter.h"
#include <kglobal.h>
#include <filter/kis_filter.h>
#include <filter/kis_filter_configuration.h>
#include <kis_filter_mask.h>
......
......@@ -29,6 +29,7 @@
#include <QTextEdit>
#include <klocale.h>
#include <kglobal.h>
#include <KoColorSpace.h>
#include "KoColorProfile.h"
......
......@@ -705,10 +705,10 @@ KisDlgPreferences::KisDlgPreferences(QWidget* parent, const char* name)
: KPageDialog(parent)
{
Q_UNUSED(name);
setCaption(i18n("Preferences"));
setButtons(Ok | Cancel | Help | Default);
setDefaultButton(Ok);
showButtonSeparator(true);
// setCaption(i18n("Preferences"));
// setButtons(Ok | Cancel | Help | Default);
// setDefaultButton(Ok);
// showButtonSeparator(true);
setFaceType(KPageDialog::List);
// General
......
......@@ -27,6 +27,7 @@
#include "kis_input_configuration_page_item.h"
#include <QDir>
#include <KStandardDirs>
#include <kglobal.h>
#include "KoIcon.h"
......
......@@ -461,11 +461,12 @@ void KisInputManager::Private::saveTabletEvent(const QTabletEvent *event)
new QTabletEvent(event->type(),
event->pos(),
event->globalPos(),
#ifdef Q_WS_X11
multiplyPoints(event->hiResGlobalPos(), hiResEventsWorkaroundCoeff),
#else
event->hiResGlobalPos(),
#endif
// QT5PORT
// #ifdef Q_WS_X11
// multiplyPoints(event->hiResGlobalPos(), hiResEventsWorkaroundCoeff),
// #else
// event->hiResGlobalPos(),
// #endif
event->device(),
event->pointerType(),
event->pressure(),
......@@ -481,7 +482,7 @@ void KisInputManager::Private::saveTabletEvent(const QTabletEvent *event)
void KisInputManager::Private::saveTouchEvent( QTouchEvent* event )
{
delete lastTouchEvent;
lastTouchEvent = new QTouchEvent(event->type(), event->deviceType(), event->modifiers(), event->touchPointStates(), event->touchPoints());
lastTouchEvent = new QTouchEvent(event->type(), event->device(), event->modifiers(), event->touchPointStates(), event->touchPoints());
}
void KisInputManager::Private::resetSavedTabletEvent(QEvent::Type /*type*/)
......
This diff is collapsed.
......@@ -230,10 +230,10 @@ void KisActionManager::updateGUI()
KisAction *KisActionManager::createStandardAction(KStandardAction::StandardAction actionType, const QObject *receiver, const char *member)
{
KAction *standardAction = KStandardAction::create(actionType, receiver, member, 0);
QAction *standardAction = KStandardAction::create(actionType, receiver, member, 0);
KisAction *action = new KisAction(KIcon(standardAction->icon()), standardAction->text());
action->setShortcut(standardAction->shortcut(KAction::DefaultShortcut), KAction::DefaultShortcut);
action->setShortcut(standardAction->shortcut(KAction::ActiveShortcut), KAction::ActiveShortcut);
// action->setShortcut(standardAction->shortcut(KAction::DefaultShortcut), KAction::DefaultShortcut);
// action->setShortcut(standardAction->shortcut(KAction::ActiveShortcut), KAction::ActiveShortcut);
action->setCheckable(standardAction->isCheckable());
if (action->isCheckable()) {
action->setChecked(standardAction->isChecked());
......
......@@ -109,7 +109,7 @@ QModelIndex KisBookmarkedConfigurationsModel::indexFor(const QString& name) cons
{
int idx = d->configsKey.indexOf(name);
if (idx == -1) return QModelIndex();
return createIndex(idx + 2, 0, 0);
return createIndex(idx + 2, 0);
}
bool KisBookmarkedConfigurationsModel::isIndexDeletable(const QModelIndex &index) const
......
......@@ -30,6 +30,8 @@
#include <QtGlobal>
#include <qmath.h>
#include <kglobal.h>
#include <kstandarddirs.h>
......@@ -398,7 +400,7 @@ QCursor KisCursor::rotateCursor()
QCursor KisCursor::load(const QString & iconName, int hotspotX, int hotspotY)
{
QString filename = KisFactory::componentData().dirs()->findResource("kis_pics", iconName);
QString filename = KGlobal::dirs()->findResource("kis_pics", iconName);
QImage cursorImage;
cursorImage.load(filename);
......
......@@ -31,6 +31,7 @@
#include <klocale.h>
#include <kstandarddirs.h>
#include <kiconloader.h>
#include <kglobal.h>
#include <kis_debug.h>
......@@ -67,19 +68,19 @@ KAboutData* KisFactory::aboutData()
const KComponentData &KisFactory::componentData()
{
if (!s_componentData) {
s_componentData = new KComponentData(aboutData());
s_componentData = 0;//new KComponentData(aboutData());
Q_CHECK_PTR(s_componentData);
s_componentData->dirs()->addResourceType("krita_template", "data", "krita/templates");
KGlobal::dirs()->addResourceType("krita_template", "data", "krita/templates");
// for cursors
s_componentData->dirs()->addResourceType("kis_pics", "data", "krita/pics/");
KGlobal::dirs()->addResourceType("kis_pics", "data", "krita/pics/");
// for images in the paintop box
s_componentData->dirs()->addResourceType("kis_images", "data", "krita/images/");
KGlobal::dirs()->addResourceType("kis_images", "data", "krita/images/");
s_componentData->dirs()->addResourceType("icc_profiles", 0, "krita/profiles/");
KGlobal::dirs()->addResourceType("icc_profiles", 0, "krita/profiles/");
s_componentData->dirs()->addResourceType("kis_shaders", "data", "krita/shaders/");
KGlobal::dirs()->addResourceType("kis_shaders", "data", "krita/shaders/");
// Tell the iconloader about share/apps/calligra/icons
KIconLoader::global()->addAppDir("calligra");
......
......@@ -195,9 +195,8 @@ void KisImageManager::slotImageColor()
if (!image) return;
KColorDialog dlg;
#if KDE_IS_VERSION(4,5,0)
dlg.setAlphaChannelEnabled(true);
#endif
KoColor bg = image->defaultProjectionColor();
dlg.setColor(bg.toQColor());
......
......@@ -35,6 +35,7 @@
#include <kurl.h>
#include <kdiroperator.h>
#include <kurlcombobox.h>
#include <kmimetype.h>
#include <KoIcon.h>
#include <KisImportExportManager.h>
......@@ -827,7 +828,7 @@ void KisLayerManager::saveGroupLayers()
KFileWidget *fd = new KFileWidget(m_view->document()->url().path(), page);
fd->setUrl(m_view->document()->url());
fd->setMimeFilter(listMimeFilter);
fd->setOperationMode(KAbstractFileWidget::Saving);
fd->setOperationMode(KFileWidget::Saving);
layout->addWidget(fd);
QCheckBox *chkInvisible = new QCheckBox(i18n("Convert Invisible Groups"), page);
......
......@@ -23,6 +23,7 @@
#include <kactioncollection.h>
#include <kmimetype.h>
#include <kshortcut.h>
#include <KoIcon.h>
#include <KoProperties.h>
......
......@@ -389,7 +389,7 @@ QVariant KisNodeModel::data(const QModelIndex &index, int role) const
case Qt::EditRole: return node->name();
case Qt::SizeHintRole: return m_d->image->size(); // FIXME
case Qt::TextColorRole:
return belongsToIsolatedGroup(node) ? QVariant() : Qt::gray;
return belongsToIsolatedGroup(node) ? QVariant() : QVariant( QColor(Qt::gray));
case PropertiesRole: return QVariant::fromValue(node->sectionModelProperties());
case AspectRatioRole: return double(m_d->image->width()) / m_d->image->height();
case ProgressRole: {
......
......@@ -26,6 +26,8 @@
#include <kstandarddirs.h>
#include "kis_factory2.h"
#include <kglobal.h>
KisPaintOpListModel::KisPaintOpListModel(QObject *parent)
: BasePaintOpCategorizedListModel(parent)
{
......@@ -56,7 +58,7 @@ QVariant KisPaintOpListModel::data(const QModelIndex& idx, int role) const
void KisPaintOpListModel::fill(const QList<KisPaintOpFactory*>& list)
{
foreach (KisPaintOpFactory *factory, list) {
QString fileName = KisFactory::componentData().dirs()->findResource("kis_images", factory->pixmap());
QString fileName = KGlobal::dirs()->findResource("kis_images", factory->pixmap());
QPixmap pixmap(fileName);
if(pixmap.isNull()){
......
......@@ -35,6 +35,8 @@
#include <kactioncollection.h>
#include <kacceleratormanager.h>
#include <kshortcut.h>
#include <kglobal.h>
#include <KoIcon.h>
#include <KoColorSpace.h>
......@@ -410,7 +412,7 @@ QPixmap KisPaintopBox::paintopPixmap(const KoID& paintop)
if (pixmapName.isEmpty())
return QPixmap();
return QPixmap(KisFactory::componentData().dirs()->findResource("kis_images", pixmapName));
return QPixmap(KGlobal::dirs()->findResource("kis_images", pixmapName));
}
KoID KisPaintopBox::currentPaintop()
......@@ -472,7 +474,7 @@ void KisPaintopBox::setCurrentPaintop(const KoID& paintop, KisPaintOpPresetSP pr
KisPaintOpFactory* paintOp = KisPaintOpRegistry::instance()->get(paintop.id());
QString pixFilename = KisFactory::componentData().dirs()->findResource("kis_images", paintOp->pixmap());
QString pixFilename = KGlobal::dirs()->findResource("kis_images", paintOp->pixmap());
m_settingsWidget->setIcon(QIcon(pixFilename));
m_resourceProvider->setPaintOpPreset(preset);
......
......@@ -38,6 +38,7 @@
#include <klocale.h>
#include <kio/netaccess.h>
#include <kurl.h>
#include <KoColorSpace.h>
#include <KoDocumentInfo.h>
......
......@@ -25,6 +25,8 @@
#include <QColor>
#include <QVector>
#include <kurl.h>
#include "kis_types.h"
#include "kis_global.h"
#include "kis_annotation.h"
......
......@@ -34,6 +34,7 @@
#include <QDebug>
#include <QQueue>
#include <QMenu>
#include <QWhatsThis>
#include <math.h>
#include "kis_signal_compressor.h"
......
......@@ -34,6 +34,8 @@
#include <kconfiggroup.h>
#include <kcomponentdata.h>
#include <kaboutdata.h>
#include <k4aboutdata.h>
#include <kicon.h>
#include <kis_factory2.h>
......
......@@ -154,7 +154,7 @@ void KisStatusBar::imageSizeChanged()
void KisStatusBar::updateSelectionIcon()
{
KIcon icon;
QIcon icon;
if (!m_view->selectionManager()->displaySelection()) {
icon = themedIcon("selection-mode_invisible.png");
} else if (m_view->selectionManager()->showSelectionAsMask()) {
......
......@@ -24,6 +24,8 @@
#include <QMessageBox>
#include <kurl.h>
#include <KoStore.h>
#include <KoColorSpaceRegistry.h>
#include <KoColorProfile.h>
......
......@@ -42,6 +42,7 @@
#include <QTransform>
#include <kstandarddirs.h>
#include <kglobal.h>
#include "KoToolProxy.h"
......
......@@ -172,24 +172,29 @@ namespace VSyncWorkaround {
dlclose(handle);
}
}
if (!procAddress) {
QLibrary lib(::qt_gl_library_name());
//lib.setLoadHints(QLibrary::ImprovedSearchHeuristics);