Commit ab2e5c8d authored by Casper Boemann's avatar Casper Boemann

make libs and krita compile with qt 4.2 tp and kdelibs_snapshot

other apps might compile too

krita crashes on startup though


svn path=/trunk/koffice/; revision=557745
parent 3f3c6eb1
......@@ -12,7 +12,7 @@ find_package(KDE4 REQUIRED)
include(KDE4Defaults)
find_package(Perl REQUIRED)
find_package(ZLIB REQUIRED)
include (FindQtDBus)
#include (FindQtDBus)
macro_optional_find_package(OpenEXR)
macro_optional_find_package(Exif)
macro_optional_find_package(PythonLibs)
......@@ -23,7 +23,7 @@ if (APPLE)
endif (APPLE)
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DHAVE_CONFIG_H=1)
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} -DHAVE_CONFIG_H=1)
link_directories(${KDE4_LIB_DIR})
......
......@@ -115,6 +115,7 @@ if (SHOULD_BUILD_KRITA)
add_subdirectory( data )
add_subdirectory( pics )
########### next target ###############
set(kritapart_PART_SRCS krita_part_init.cc)
......@@ -130,6 +131,7 @@ if (SHOULD_BUILD_KRITA)
install_targets(${PLUGIN_INSTALL_DIR} kritapart)
########### next target ###############
set(krita_KDEINIT_SRCS main.cc)
......
......@@ -19,8 +19,6 @@ set(kritacolor_LIB_SRCS
kde4_automoc(${kritacolor_LIB_SRCS})
kde4_add_dcop_skels(kritacolor_LIB_SRCS )
kde4_add_library(kritacolor SHARED ${kritacolor_LIB_SRCS})
target_link_libraries(kritacolor ${KDE4_KDECORE_LIBS} ${KDE4_KPARTS_LIBS} ${LCMS_LIBRARIES} ${LINK_OPENEXR_LIB} pigment kofficecore)
......
......@@ -47,6 +47,7 @@
#include <klocale.h>
#include <knuminput.h>
#include <kurlrequester.h>
#include <kpagewidgetmodel.h>
#include "squeezedcombobox.h"
#include "kis_clipboard.h"
......@@ -771,19 +772,21 @@ PreferencesDialog::PreferencesDialog( QWidget* parent, const char* name )
setCaption( i18n("Preferences") );
setButtons( Ok | Cancel | Help | Default );
setDefaultButton( Ok );
enableButtonSeparator( true );
showButtonSeparator( true );
setFaceType( KPageDialog::List );
KVBox *vbox = new KVBox();
KPageWidgetItem *page = new KPageWidgetItem( vbox, i18n( "General"));
page->setHeader( i18n( "General") );
page->setIcon( BarIcon( "misc", K3Icon::SizeMedium ) );
page->setIcon( KIcon(BarIcon( "misc", K3Icon::SizeMedium )) );
addPage( page );
m_general = new GeneralTab( vbox );
#ifdef HAVE_OPENGL
vbox = new KVBox();
page = new KPageWidgetItem( vbox, i18n( "Display" ));
page->setHeader( i18n( "Display" ) );
page->setIcon( BarIcon( "kscreensaver", K3Icon::SizeMedium ) );
page->setIcon( KIcon(BarIcon( "kscreensaver", K3Icon::SizeMedium
))
);
addPage( page );
m_displaySettings = new DisplaySettingsTab( vbox );
......@@ -791,21 +794,21 @@ PreferencesDialog::PreferencesDialog( QWidget* parent, const char* name )
vbox = new KVBox();
page = new KPageWidgetItem( vbox, i18n( "Color Management"));
page->setHeader( i18n( "Color") );
page->setIcon( BarIcon( "colorize", K3Icon::SizeMedium ));
page->setIcon( KIcon( BarIcon( "colorize", K3Icon::SizeMedium )));
addPage( page );
m_colorSettings = new ColorSettingsTab( vbox );
vbox = new KVBox();
page = new KPageWidgetItem( vbox, i18n( "Performance"));
page->setHeader( i18n( "Performance") );
page->setIcon( BarIcon( "fork", K3Icon::SizeMedium ));
page->setIcon( KIcon( BarIcon( "fork", K3Icon::SizeMedium )));
addPage( page );
m_performanceSettings = new PerformanceTab ( vbox );
vbox = new KVBox();
page = new KPageWidgetItem( vbox, i18n( "Tablet" ));
page->setHeader( i18n( "Tablet" ));
page->setIcon( BarIcon( "tablet", K3Icon::SizeMedium ));
page->setIcon( KIcon( BarIcon( "tablet", K3Icon::SizeMedium )));
addPage( page );
m_tabletSettings = new TabletSettingsTab( vbox );
......@@ -813,7 +816,7 @@ PreferencesDialog::PreferencesDialog( QWidget* parent, const char* name )
vbox = new KVBox();
page = new KPageWidgetItem( vbox, i18n( "Grid" ));
page->setHeader( i18n( "Grid" ));
page->setIcon( BarIcon( "grid", K3Icon::SizeMedium ));
page->setIcon( KIcon( BarIcon( "grid", K3Icon::SizeMedium )));
addPage( page );
m_gridSettings = new GridSettingsTab( vbox );
......
......@@ -1741,7 +1741,7 @@ void KisView::saveLayerAsImage()
QStringList listMimeFilter = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Export);
QString mimelist = listMimeFilter.join(" ");
KFileDialog fd (QString::null, mimelist, this);
KFileDialog fd (KUrl(QString::null), mimelist, this);
fd.setObjectName("Export Layer");
fd.setCaption(i18n("Export Layer"));
fd.setMimeFilter(listMimeFilter);
......@@ -1788,7 +1788,8 @@ qint32 KisView::importImage(const KUrl& urlArg)
if (urlArg.isEmpty()) {
QString mimelist = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Import).join(" ");
urls = KFileDialog::getOpenURLs(QString::null, mimelist, 0, i18n("Import Image"));
urls = KFileDialog::getOpenURLs(KUrl(QString::null), mimelist,
0, i18n("Import Image"));
} else {
urls.push_back(urlArg);
}
......@@ -3819,7 +3820,7 @@ void KisView::createDockers()
connect(m_hsvwidget, SIGNAL(sigBgColorChanged(const QColor &)), this, SLOT(slotSetBGQColor(const QColor &)));
connect(this, SIGNAL(sigFGQColorChanged(const QColor &)), m_hsvwidget, SLOT(setFgColor(const QColor &)));
connect(this, SIGNAL(sigBGQColorChanged(const QColor &)), m_hsvwidget, SLOT(setBgColor(const QColor &)));
m_paletteManager->addWidget( m_hsvwidget, "hsvwidget", krita::COLORBOX, 0, PALETTE_DOCKER, true);
//m_paletteManager->addWidget( m_hsvwidget, "hsvwidget", krita::COLORBOX, 0, PALETTE_DOCKER, true);
m_rgbwidget = new KoRGBWidget(this, "rgb");
m_rgbwidget->setWindowTitle(i18n("RGB"));
......@@ -3827,7 +3828,7 @@ void KisView::createDockers()
connect(m_rgbwidget, SIGNAL(sigBgColorChanged(const QColor &)), this, SLOT(slotSetBGQColor(const QColor &)));
connect(this, SIGNAL(sigFGQColorChanged(const QColor &)), m_rgbwidget, SLOT(setFgColor(const QColor &)));
connect(this, SIGNAL(sigBGQColorChanged(const QColor &)), m_rgbwidget, SLOT(setBgColor(const QColor &)));
m_paletteManager->addWidget( m_rgbwidget, "rgbwidget", krita::COLORBOX);
//m_paletteManager->addWidget( m_rgbwidget, "rgbwidget", krita::COLORBOX);
m_graywidget = new KoGrayWidget(this, "gray");
m_graywidget->setWindowTitle(i18n("Gray"));
......@@ -3835,7 +3836,7 @@ void KisView::createDockers()
connect(m_graywidget, SIGNAL(sigBgColorChanged(const QColor &)), this, SLOT(slotSetBGQColor(const QColor &)));
connect(this, SIGNAL(sigFGQColorChanged(const QColor &)), m_graywidget, SLOT(setFgColor(const QColor &)));
connect(this, SIGNAL(sigBGQColorChanged(const QColor &)), m_graywidget, SLOT(setBgColor(const QColor &)));
m_paletteManager->addWidget( m_graywidget, "graywidget", krita::COLORBOX);
//m_paletteManager->addWidget( m_graywidget, "graywidget", krita::COLORBOX);
//make sure the color chooser get right default values
emit sigFGQColorChanged(m_fg.toQColor());
......@@ -3855,7 +3856,7 @@ void KisView::createDockers()
m_palettewidget->slotAddPalette(resource);
}
connect(m_palettewidget, SIGNAL(colorSelected(const KoColor &)), this, SLOT(slotSetFGColor(const KoColor &)));
m_paletteManager->addWidget( m_palettewidget, "palettewidget", krita::COLORBOX, 10, PALETTE_DOCKER, true);
//m_paletteManager->addWidget( m_palettewidget, "palettewidget", krita::COLORBOX, 10, PALETTE_DOCKER, true);
}
QPoint KisView::applyViewTransformations(const QPoint& p) const {
......
......@@ -19,7 +19,7 @@
#include "KoApplication.h"
#include "KoApplicationAdaptor.h"
#include <dbus/qdbus.h>
#include <QtDBus/QtDBus>
#include <config.h>
#include <QFile>
#include <QRegExp>
......
......@@ -22,7 +22,7 @@
#define __KoApplicationAdaptor_h__
#include <QtCore/QObject>
#include <dbus/qdbus.h>
#include <QtDBus/QtDBus>
class QByteArray;
template<class T> class QList;
template<class Key, class Value> class QMap;
......
......@@ -23,7 +23,7 @@
#include "KoDom.h"
#include "KoDocument_p.h"
#include "KoDocumentAdaptor.h"
#include <dbus/qdbus.h>
#include <QtDBus/QtDBus>
#include "KoDocumentChild.h"
#include "KoView.h"
#include "KoMainWindow.h"
......
......@@ -24,7 +24,7 @@
#include <QMap>
#include <QtCore/QObject>
#include <dbus/qdbus.h>
#include <QtDBus/qdbusabstractadaptor.h>
#include <q3valuelist.h>
#include <koffice_export.h>
class KoDocument;
......
......@@ -1118,7 +1118,7 @@ void KoMainWindow::slotFileNew()
void KoMainWindow::slotFileOpen()
{
KFileDialog *dialog = new KFileDialog(":OpenDialog", QString::null, this);
KFileDialog *dialog = new KFileDialog(KUrl(":OpenDialog"), QString::null, this);
dialog->setObjectName( "file dialog" );
dialog->setMode(KFile::File);
if (!isImporting())
......
......@@ -162,7 +162,7 @@ void KoOpenPane::showOpenFileDialog()
const QStringList mimeFilter = KoFilterManager::mimeFilter(KoDocument::readNativeFormatMimeType(),
KoFilterManager::Import, KoDocument::readExtraNativeMimeTypes());
KUrl url = KFileDialog::getOpenURL(":OpenDialog", mimeFilter.join(" "), this);
KUrl url = KFileDialog::getOpenURL(KUrl(":OpenDialog"),mimeFilter.join(" "), this);
if(!url.isEmpty()) {
KConfigGroup cfgGrp(d->m_instance->config(), "TemplateChooserDialog");
......
......@@ -24,7 +24,7 @@
#include <QMap>
#include <QObject>
#include <dbus/qdbus.h>
#include <QtDBus/QtDBus>
class QString;
class QStringList;
......
......@@ -27,6 +27,8 @@
#include <klocale.h>
#include <kcharselect.h>
#include <kdebug.h>
#include <kstdguiitem.h>
/******************************************************************/
/* class KoCharSelectDia */
/******************************************************************/
......
......@@ -33,6 +33,8 @@
#include "KoInsertLink.h"
#include <kdesktopfile.h>
#include <krecentdocument.h>
#include <kpagewidgetmodel.h>
#include <kicon.h>
using namespace KOfficePrivate;
......@@ -49,19 +51,19 @@ KoInsertLinkDia::KoInsertLinkDia( QWidget *parent, const char *name, bool displa
KVBox *page = new KVBox();
p1=addPage(page, i18n("Internet") );
p1->setIcon( BarIcon("html",K3Icon::SizeMedium) );
p1->setIcon( KIcon(BarIcon("html",K3Icon::SizeMedium)) );
internetLink = new internetLinkPage(page );
connect(internetLink,SIGNAL(textChanged()),this,SLOT(slotTextChanged ( )));
page = new KVBox();
p2=addPage(page, i18n("Mail & News") );
p2->setIcon( BarIcon("mail_generic",K3Icon::SizeMedium) );
p2->setIcon( KIcon(BarIcon("mail_generic",K3Icon::SizeMedium)) );
mailLink = new mailLinkPage(page );
connect(mailLink,SIGNAL(textChanged()),this,SLOT(slotTextChanged ()));
page = new KVBox();
p3=addPage(page, i18n("File"));
p3->setIcon( BarIcon("filenew",K3Icon::SizeMedium) );
p3->setIcon( KIcon(BarIcon("filenew",K3Icon::SizeMedium)) );
fileLink = new fileLinkPage(page );
connect(fileLink,SIGNAL(textChanged()),this,SLOT(slotTextChanged ()));
......@@ -69,7 +71,7 @@ KoInsertLinkDia::KoInsertLinkDia( QWidget *parent, const char *name, bool displa
{
page = new KVBox();
p4=addPage(page, i18n("Bookmark"));
p4->setIcon( BarIcon("bookmark",K3Icon::SizeMedium) );
p4->setIcon( KIcon(BarIcon("bookmark",K3Icon::SizeMedium)) );
bookmarkLink = new bookmarkLinkPage(page );
connect(bookmarkLink,SIGNAL(textChanged()),this,SLOT(slotTextChanged ()));
}
......
......@@ -45,6 +45,8 @@
#include <kmessagebox.h>
#include <kapplication.h>
#include <kaboutdata.h>
#include <kpagewidgetmodel.h>
#include <kicon.h>
#include <QApplication>
#include <QLayout>
......@@ -427,7 +429,7 @@ void KoTemplateChooseDia::setupTemplateDialog(QWidget * widgetbase, QGridLayout
QFrame * frame = new QFrame();
KPageWidgetItem * item = d->m_jwidget->addPage ( frame, group->name() );
item->setIcon( group->first()->loadPicture(d->m_instance) );
item->setIcon( KIcon(group->first()->loadPicture(d->m_instance)) );
item->setHeader( group->name() );
QGridLayout* layout = new QGridLayout(frame);
......
......@@ -51,7 +51,6 @@ TKAction::TKAction(KActionCollection* parent, const char* name)
{
m_imode = TK::IconOnly;
setToolBarWidgetFactory(this);
}
TKAction::~TKAction()
......
......@@ -20,7 +20,7 @@
#ifndef TKACTION_H
#define TKACTION_H
#include <QAction>
#include <QWidgetAction>
#include <kaction.h>
#include <QStringList>
......@@ -36,7 +36,7 @@ class TKComboBox;
class QToolBar;
class KOFFICEUI_EXPORT TKAction : public KAction, QActionWidgetFactory
class KOFFICEUI_EXPORT TKAction : public KAction
{ Q_OBJECT
public:
TKAction(KActionCollection* parent, const char* name);
......
This diff is collapsed.
......@@ -72,6 +72,10 @@ private:
ChannelType m_activeChannel;
KoColor m_currentColor;
KoColorSpace *rgbColorSpace();
KoColorSpace *labColorSpace();
KoColorSpace *cmykColorSpace();
void announceColor();
void updateValues();
void updateSelectorsR();
......@@ -88,6 +92,10 @@ private:
QLabel *m_RLabel;
QLabel *m_GLabel;
QLabel *m_BLabel;
QLabel *m_CLabel;
QLabel *m_MLabel;
QLabel *m_YLabel;
QLabel *m_KLabel;
QLabel *m_LLabel;
QLabel *m_aLabel;
QLabel *m_bLabel;
......@@ -97,6 +105,10 @@ private:
QSpinBox *m_RIn;
QSpinBox *m_GIn;
QSpinBox *m_BIn;
QSpinBox *m_CIn;
QSpinBox *m_MIn;
QSpinBox *m_YIn;
QSpinBox *m_KIn;
QSpinBox *m_LIn;
QSpinBox *m_aIn;
QSpinBox *m_bIn;
......
......@@ -75,7 +75,7 @@ void KoGrayWidget::slotChanged(int v)
{
v = 255 - v;
if (m_ColorButton->current() == KDualColorButton::Foreground){
if (m_ColorButton->currentColor() == KDualColorButton::Foreground){
slotFGColorSelected( QColor( v, v, v));
}
else{
......@@ -103,7 +103,8 @@ void KoGrayWidget::update(const QColor & fgColor, const QColor & bgColor)
m_fgColor = fgColor;
m_bgColor = bgColor;
QColor color = (m_ColorButton->current() == KDualColorButton::Foreground)? m_fgColor : m_bgColor;
QColor color = (m_ColorButton->currentColor() ==
KDualColorButton::Foreground)? m_fgColor : m_bgColor;
disconnect(mSlider, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int)));
disconnect(mIn, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int)));
......@@ -127,7 +128,7 @@ void KoGrayWidget::slotFGColorSelected(const QColor& c)
m_fgColor = c;
disconnect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
m_ColorButton->setForeground( m_fgColor );
m_ColorButton->setForegroundColor( m_fgColor );
connect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
emit sigFgColorChanged(m_fgColor);
......@@ -138,13 +139,13 @@ void KoGrayWidget::slotBGColorSelected(const QColor& c)
m_bgColor = c;
disconnect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
m_ColorButton->setBackground( m_bgColor );
m_ColorButton->setBackgroundColor( m_bgColor );
connect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
emit sigBgColorChanged(m_bgColor);
}
void KoGrayWidget::currentChanged(KDualColorButton::DualColor s)
void KoGrayWidget::currentChanged(KDualColorButton::Selection s)
{
if(s == KDualColorButton::Foreground)
slotFGColorSelected(m_ColorButton->currentColor());
......
......@@ -61,7 +61,7 @@ protected slots:
void slotFGColorSelected(const QColor& c);
void slotBGColorSelected(const QColor& c);
void currentChanged(KDualColorButton::DualColor);
void currentChanged(KDualColorButton::Selection);
private:
......
......@@ -121,7 +121,7 @@ KoHSVWidget::KoHSVWidget(QWidget *parent, const char *name) : super(parent)
void KoHSVWidget::slotHChanged(int h)
{
//kDebug() << "H changed: " << h << endl;
if (m_ColorButton->current() == KDualColorButton::Foreground){
if (m_ColorButton->currentColor() == KDualColorButton::Foreground){
m_fgColor.setHSV(h, m_fgColor.S(), m_fgColor.V());
changedFgColor();
}
......@@ -134,7 +134,7 @@ void KoHSVWidget::slotHChanged(int h)
void KoHSVWidget::slotSChanged(int s)
{
//kDebug() << "S changed: " << s << endl;
if (m_ColorButton->current() == KDualColorButton::Foreground){
if (m_ColorButton->currentColor() == KDualColorButton::Foreground){
m_fgColor.setHSV(m_fgColor.H(), s, m_fgColor.V());
changedFgColor();
}
......@@ -148,7 +148,7 @@ void KoHSVWidget::slotVChanged(int v)
{
//kDebug() << "V changed: " << v << ", setting autovalue to false " << endl;
m_autovalue = false;
if (m_ColorButton->current() == KDualColorButton::Foreground){
if (m_ColorButton->currentColor() == KDualColorButton::Foreground){
m_fgColor.setHSV(m_fgColor.H(), m_fgColor.S(), v);
changedFgColor();
}
......@@ -161,7 +161,7 @@ void KoHSVWidget::slotVChanged(int v)
void KoHSVWidget::slotWheelChanged(const KoOldColor& c)
{
//kDebug() << "Wheel changed: " << c.color() << endl;
if (m_ColorButton->current() == KDualColorButton::Foreground){
if (m_ColorButton->currentColor() == KDualColorButton::Foreground){
if(m_autovalue)
m_fgColor.setHSV(c.H(), c.S(), 255);
else
......@@ -198,7 +198,7 @@ void KoHSVWidget::changedFgColor()
{
//kDebug() << "ChangedFgColor\n";
disconnect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
m_ColorButton->setForeground( m_fgColor.color() );
m_ColorButton->setForegroundColor( m_fgColor.color() );
connect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
update( m_fgColor, m_bgColor);
......@@ -210,7 +210,7 @@ void KoHSVWidget::changedBgColor()
{
//kDebug() << "changedBgColor()\n";
disconnect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
m_ColorButton->setBackground( m_bgColor.color() );
m_ColorButton->setBackgroundColor( m_bgColor.color() );
connect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
update(m_fgColor, m_bgColor );
......@@ -231,7 +231,8 @@ void KoHSVWidget::update(const KoOldColor & fgColor, const KoOldColor & bgColor)
m_fgColor = fgColor;
m_bgColor = bgColor;
KoOldColor color = (m_ColorButton->current() == KDualColorButton::Foreground)? m_fgColor : m_bgColor;
KoOldColor color = (m_ColorButton->currentColor() ==
KDualColorButton::Foreground)? m_fgColor : m_bgColor;
int h = color.H();
int s = color.S();
......@@ -272,7 +273,7 @@ void KoHSVWidget::slotBGColorSelected(const QColor& c)
changedBgColor();
}
void KoHSVWidget::currentChanged(KDualColorButton::DualColor s)
void KoHSVWidget::currentChanged(KDualColorButton::Selection s)
{
//kDebug() << "currentChanged\n";
if(s == KDualColorButton::Foreground)
......
......@@ -69,7 +69,7 @@ protected slots:
void slotFGColorSelected(const QColor& c);
void slotBGColorSelected(const QColor& c);
void currentChanged(KDualColorButton::DualColor);
void currentChanged(KDualColorButton::Selection);
private:
void changedFgColor();
......
......@@ -119,7 +119,7 @@ KoRGBWidget::KoRGBWidget(QWidget *parent, const char *name) : super(parent, name
void KoRGBWidget::slotRChanged(int r)
{
if (m_ColorButton->current() == KDualColorButton::Foreground)
if (m_ColorButton->currentColor() == KDualColorButton::Foreground)
slotFGColorSelected( QColor(r, m_fgColor.green(), m_fgColor.blue()));
else
slotBGColorSelected( QColor(r, m_bgColor.green(), m_bgColor.blue()));
......@@ -127,7 +127,7 @@ void KoRGBWidget::slotRChanged(int r)
void KoRGBWidget::slotGChanged(int g)
{
if (m_ColorButton->current() == KDualColorButton::Foreground)
if (m_ColorButton->currentColor() == KDualColorButton::Foreground)
slotFGColorSelected( QColor( m_fgColor.red(), g, m_fgColor.blue()));
else
slotBGColorSelected( QColor( m_bgColor.red(), g, m_bgColor.blue()));;
......@@ -135,7 +135,7 @@ void KoRGBWidget::slotGChanged(int g)
void KoRGBWidget::slotBChanged(int b)
{
if (m_ColorButton->current() == KDualColorButton::Foreground)
if (m_ColorButton->currentColor() == KDualColorButton::Foreground)
slotFGColorSelected( QColor( m_fgColor.red(), m_fgColor.green(), b));
else
slotBGColorSelected( QColor( m_bgColor.red(), m_bgColor.green(), b));
......@@ -161,7 +161,8 @@ void KoRGBWidget::update(const QColor fgColor, const QColor bgColor)
m_fgColor = fgColor;
m_bgColor = bgColor;
QColor color = (m_ColorButton->current() == KDualColorButton::Foreground)? m_fgColor : m_bgColor;
QColor color = (m_ColorButton->currentColor() ==
KDualColorButton::Foreground)? m_fgColor : m_bgColor;
int r = color.red();
int g = color.green();
......@@ -198,7 +199,7 @@ void KoRGBWidget::slotFGColorSelected(const QColor& c)
{
m_fgColor = c;
disconnect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
m_ColorButton->setForeground( m_fgColor );
m_ColorButton->setForegroundColor( m_fgColor );
connect(m_ColorButton, SIGNAL(fgChanged(const QColor &)), this, SLOT(slotFGColorSelected(const QColor &)));
update( m_fgColor, m_bgColor);
......@@ -210,14 +211,14 @@ void KoRGBWidget::slotBGColorSelected(const QColor& c)
m_bgColor = c;
disconnect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
m_ColorButton->setBackground( m_bgColor );
m_ColorButton->setBackgroundColor( m_bgColor );
connect(m_ColorButton, SIGNAL(bgChanged(const QColor &)), this, SLOT(slotBGColorSelected(const QColor &)));
update(m_fgColor, m_bgColor);
emit sigBgColorChanged(m_bgColor);
}
void KoRGBWidget::currentChanged(KDualColorButton::DualColor s)
void KoRGBWidget::currentChanged(KDualColorButton::Selection s)
{
if(s == KDualColorButton::Foreground)
slotFGColorSelected(m_ColorButton->currentColor());
......
......@@ -65,7 +65,7 @@ protected slots:
void slotFGColorSelected(const QColor& c);
void slotBGColorSelected(const QColor& c);
void currentChanged(KDualColorButton::DualColor);
void currentChanged(KDualColorButton::Selection);
private:
......
......@@ -168,7 +168,7 @@ PixmapEdit::selectPixmapFileName()
this, 0, caption);
#else
KUrl url( KFileDialog::getImageOpenURL(
":lastVisitedImagePath", this, caption) );
KUrl(":lastVisitedImagePath"), this, caption) );
QString fileName = url.isLocalFile() ? url.path() : url.prettyUrl();
//! @todo download the file if remote, then set fileName properly
......
......@@ -132,7 +132,7 @@ StringListEdit::showEditor()
dialog.setButtons( KDialog::Ok|KDialog::Cancel );
dialog.setDefaultButton( KDialog::Ok );
dialog.setModal( false );
dialog.enableButtonSeparator( true );
dialog.showButtonSeparator( true );
KEditListBox *edit = new KEditListBox(i18n("Contents of %1", property()->caption()), &dialog, "editlist");
dialog.setMainWidget(edit);
edit->insertStringList(m_list);
......
......@@ -110,7 +110,7 @@ SymbolCombo::selectChar()
dialog.setButtons( KDialog::Ok|KDialog::Cancel );
dialog.setDefaultButton( KDialog::Ok );
dialog.setModal( false );
dialog.enableButtonSeparator( true );
dialog.showButtonSeparator( true );
KCharSelect *select = new KCharSelect(&dialog, "select_char");
dialog.setMainWidget(select);
......
......@@ -190,7 +190,7 @@ KoAutoFormatDia::KoAutoFormatDia( QWidget *parent, const char *name,
setButtons( Ok | Cancel | User1 );
setDefaultButton( Ok );
setButtonGuiItem( User1, KGuiItem( i18n( "&Reset" ), "undo" ) );
enableButtonSeparator( true );
showButtonSeparator( true );
noSignal=true;
newEntry = 0L;
......
......@@ -30,11 +30,11 @@
#include "KoTextObject.h"
#include "KoTextDocument.h"
#include <kspell2/backgroundchecker.h>
#include <kspell2/loader.h>
#include <kspell2/dictionary.h>
#include <kspell2/settings.h>
#include <kspell2/filter.h>
#include <sonnet/backgroundchecker.h>
#include <sonnet/loader.h>
#include <sonnet/speller.h>
#include <sonnet/settings.h>
#include <sonnet/filter.h>
using namespace KSpell2;
#include <klocale.h>
......