File koffice-1.6.3-gcc-45.diff of Package koffice
--- krita/ui/kcurve.cc~ 2007-05-30 23:41:33.000000000 +0200
+++ krita/ui/kcurve.cc 2010-07-30 17:30:21.065547654 +0200
@@ -146,7 +146,7 @@ void KCurve::paintEvent(QPaintEvent *)
pm.fill();
// Draw grid separators.
- p1.setPen(QPen::QPen(Qt::gray, 1, Qt::SolidLine));
+ p1.setPen(QPen(Qt::gray, 1, Qt::SolidLine));
p1.drawLine(wWidth/3, 0, wWidth/3, wHeight);
p1.drawLine(2*wWidth/3, 0, 2*wWidth/3, wHeight);
p1.drawLine(0, wHeight/3, wWidth, wHeight/3);
@@ -154,7 +154,7 @@ void KCurve::paintEvent(QPaintEvent *)
// Draw curve.
double curvePrevVal = getCurveValue(0.0);
- p1.setPen(QPen::QPen(Qt::black, 1, Qt::SolidLine));
+ p1.setPen(QPen(Qt::black, 1, Qt::SolidLine));
for (x = 0 ; x < wWidth ; x++)
{
double curveX;
@@ -184,13 +184,13 @@ void KCurve::paintEvent(QPaintEvent *)
if(p == m_grab_point)
{
- p1.setPen(QPen::QPen(Qt::red, 3, Qt::SolidLine));
+ p1.setPen(QPen(Qt::red, 3, Qt::SolidLine));
p1.drawEllipse( int(curveX * wWidth) - 2,
wHeight - 2 - int(curveY * wHeight), 4, 4 );
}
else
{
- p1.setPen(QPen::QPen(Qt::red, 1, Qt::SolidLine));
+ p1.setPen(QPen(Qt::red, 1, Qt::SolidLine));
p1.drawEllipse( int(curveX * wWidth) - 3,
wHeight - 3 - int(curveY * wHeight), 6, 6 );
--- krita/plugins/filters/colorsfilters/kis_perchannel_filter.cc~ 2007-05-30 23:40:06.000000000 +0200
+++ krita/plugins/filters/colorsfilters/kis_perchannel_filter.cc 2010-07-30 17:36:20.649746016 +0200
@@ -273,7 +273,7 @@ void KisPerChannelConfigWidget::setActiv
QPixmap pix(256, height);
pix.fill();
QPainter p(&pix);
- p.setPen(QPen::QPen(Qt::gray,1, Qt::SolidLine));
+ p.setPen(QPen(Qt::gray,1, Qt::SolidLine));
m_histogram->setChannel(ch);
@@ -331,7 +331,7 @@ KisPerChannelConfigWidget::KisPerChannel
// Create the horizontal gradient label
QPixmap hgradientpix(256, 1);
QPainter hgp(&hgradientpix);
- hgp.setPen(QPen::QPen(QColor(0,0,0),1, Qt::SolidLine));
+ hgp.setPen(QPen(QColor(0,0,0),1, Qt::SolidLine));
for( i=0; i<256; ++i )
{
hgp.setPen(QColor(i,i,i));
@@ -342,7 +342,7 @@ KisPerChannelConfigWidget::KisPerChannel
// Create the vertical gradient label
QPixmap vgradientpix(1, 256);
QPainter vgp(&vgradientpix);
- vgp.setPen(QPen::QPen(QColor(0,0,0),1, Qt::SolidLine));
+ vgp.setPen(QPen(QColor(0,0,0),1, Qt::SolidLine));
for( i=0; i<256; ++i )
{
vgp.setPen(QColor(i,i,i));
--- krita/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cc~ 2007-05-30 23:40:06.000000000 +0200
+++ krita/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cc 2010-07-30 17:37:38.393607284 +0200
@@ -276,7 +276,7 @@ KisBrightnessContrastConfigWidget::KisBr
// Create the horizontal gradient label
QPixmap hgradientpix(256, 1);
QPainter hgp(&hgradientpix);
- hgp.setPen(QPen::QPen(QColor(0,0,0),1, Qt::SolidLine));
+ hgp.setPen(QPen(QColor(0,0,0),1, Qt::SolidLine));
for( i=0; i<256; ++i )
{
hgp.setPen(QColor(i,i,i));
@@ -287,7 +287,7 @@ KisBrightnessContrastConfigWidget::KisBr
// Create the vertical gradient label
QPixmap vgradientpix(1, 256);
QPainter vgp(&vgradientpix);
- vgp.setPen(QPen::QPen(QColor(0,0,0),1, Qt::SolidLine));
+ vgp.setPen(QPen(QColor(0,0,0),1, Qt::SolidLine));
for( i=0; i<256; ++i )
{
vgp.setPen(QColor(i,i,i));
@@ -300,7 +300,7 @@ KisBrightnessContrastConfigWidget::KisBr
QPixmap pix(256, height);
pix.fill();
QPainter p(&pix);
- p.setPen(QPen::QPen(Qt::gray,1, Qt::SolidLine));
+ p.setPen(QPen(Qt::gray,1, Qt::SolidLine));
double highest = (double)histogram.calculations().getHighest();
Q_INT32 bins = histogram.producer()->numberOfBins();
--- krita/plugins/filters/levelfilter/kis_level_filter.cc~ 2007-05-30 23:40:10.000000000 +0200
+++ krita/plugins/filters/levelfilter/kis_level_filter.cc 2010-07-30 17:39:35.777480339 +0200
@@ -277,7 +277,7 @@ void KisLevelConfigWidget::drawHistogram
QPixmap pix(256, height);
pix.fill();
QPainter p(&pix);
- p.setPen(QPen::QPen(Qt::gray,1, Qt::SolidLine));
+ p.setPen(QPen(Qt::gray,1, Qt::SolidLine));
double highest = (double)histogram->calculations().getHighest();
Q_INT32 bins = histogram->producer()->numberOfBins();
--- krita/plugins/filters/levelfilter/kgradientslider.cc~ 2007-05-30 23:40:10.000000000 +0200
+++ krita/plugins/filters/levelfilter/kgradientslider.cc 2010-07-30 17:40:20.317462581 +0200
@@ -72,7 +72,7 @@ void KGradientSlider::paintEvent(QPaintE
// Draw first gradient
y = 0;
- p1.setPen(QPen::QPen(QColor(0,0,0),1, Qt::SolidLine));
+ p1.setPen(QPen(QColor(0,0,0),1, Qt::SolidLine));
for( x=0; x<255; ++x )
{
int gray = (255 * x) / wWidth;
--- kword/KWView.cpp~ 2007-05-30 23:34:52.000000000 +0200
+++ kword/KWView.cpp 2010-07-30 17:46:30.001809596 +0200
@@ -595,7 +595,7 @@ void KWView::setupActions()
actionCollection(), "edit_sldatabase" );
- (void) new KWMailMergeLabelAction::KWMailMergeLabelAction( i18n("Drag Mail Merge Variable"), 0,
+ (void) new KWMailMergeLabelAction( i18n("Drag Mail Merge Variable"), 0,
this, SLOT(editMailMergeDataBase()), actionCollection(), "mailmerge_draglabel" );
// (void) new KWMailMergeComboAction::KWMailMergeComboAction(i18n("Insert Mailmerge Var"),0,this,SLOT(JWJWJW()),actionCollection(),"mailmerge_varchooser");
--- kplato/kptduration.cc~ 2007-05-30 23:43:39.000000000 +0200
+++ kplato/kptduration.cc 2010-07-30 17:48:39.729359012 +0200
@@ -187,7 +187,7 @@ QString Duration::toString(Format format
return result;
}
-Duration::Duration Duration::fromString(const QString &s, Format format, bool *ok) {
+Duration Duration::fromString(const QString &s, Format format, bool *ok) {
if (ok) *ok = false;
QRegExp matcher;
Duration tmp;
--- kexi/kexidb/drivers/pqxx/pqxxdriver.cpp~ 2007-05-30 23:35:49.000000000 +0200
+++ kexi/kexidb/drivers/pqxx/pqxxdriver.cpp 2010-07-30 18:16:05.229621163 +0200
@@ -133,18 +133,40 @@ bool pqxxSqlDriver::isSystemDatabaseName
//
QString pqxxSqlDriver::escapeString( const QString& str) const
{
+ //Cannot use pqxx or libpq escape functions as they require a db connection
+ //to escape using the char encoding of the database
+ //see http://www.postgresql.org/docs/8.1/static/libpq-exec.html#LIBPQ-EXEC-ESCAPE-STRING
+/*
return QString::fromLatin1("'")
+ QString::fromAscii( pqxx::sqlesc(std::string(str.utf8())).c_str() )
+ QString::fromLatin1("'");
+*/
+//TODO Optimize
+ return QString::fromLatin1("'") + QString(str)
+ /*.replace('\\', "\\\\")*/
+ .replace('\'', "\\''")
+ .replace('"', "\\\"")
+ + QString::fromLatin1("'");
}
//==================================================================================
//
QCString pqxxSqlDriver::escapeString( const QCString& str) const
{
+ //Cannot use pqxx or libpq escape functions as they require a db connection
+ //to escape using the char encoding of the database
+ //see http://www.postgresql.org/docs/8.1/static/libpq-exec.html#LIBPQ-EXEC-ESCAPE-STRING
+/*
return QCString("'")
+ QCString( pqxx::sqlesc(QString(str).ascii()).c_str() )
+ QCString("'");
+*/
+//TODO Optimize
+ return QCString("'") + QCString(str)
+ /*.replace('\\', "\\\\")*/
+ .replace('\'', "\\''")
+ .replace('"', "\\\"")
+ + QCString("'");
}
//==================================================================================