diff options
author | 2005-12-20 23:40:04 +0000 | |
---|---|---|
committer | 2005-12-20 23:40:04 +0000 | |
commit | 96004cbf8ef0a23b35bed6bc06214b49e59e2585 (patch) | |
tree | 9506efb925d743801cd44d6faac45300a46bc4bc /app-office/scribus/files | |
parent | Fix digitemp-3.3.2 so that digitemp binary gets properly installed. Fixes bug... (diff) | |
download | gentoo-2-96004cbf8ef0a23b35bed6bc06214b49e59e2585.tar.gz gentoo-2-96004cbf8ef0a23b35bed6bc06214b49e59e2585.tar.bz2 gentoo-2-96004cbf8ef0a23b35bed6bc06214b49e59e2585.zip |
scribus memleak and gcc41 fix
(Portage version: 2.1_pre1)
Diffstat (limited to 'app-office/scribus/files')
-rw-r--r-- | app-office/scribus/files/digest-scribus-1.3.1-r1 | 1 | ||||
-rw-r--r-- | app-office/scribus/files/scribus-1.3.1-gcc41.patch | 40 | ||||
-rw-r--r-- | app-office/scribus/files/scribus-1.3.1-memleak.patch | 57 |
3 files changed, 98 insertions, 0 deletions
diff --git a/app-office/scribus/files/digest-scribus-1.3.1-r1 b/app-office/scribus/files/digest-scribus-1.3.1-r1 new file mode 100644 index 000000000000..131bc6ae9f7c --- /dev/null +++ b/app-office/scribus/files/digest-scribus-1.3.1-r1 @@ -0,0 +1 @@ +MD5 ad36f7de1bba1229d143b93d2b6cd8e9 scribus-1.3.1.tar.bz2 8838483 diff --git a/app-office/scribus/files/scribus-1.3.1-gcc41.patch b/app-office/scribus/files/scribus-1.3.1-gcc41.patch new file mode 100644 index 000000000000..c71219449ffe --- /dev/null +++ b/app-office/scribus/files/scribus-1.3.1-gcc41.patch @@ -0,0 +1,40 @@ +diff -Naur scribus-1.3.1/scribus/inspage.h scribus-1.3.1-gcc41/scribus/inspage.h +--- scribus-1.3.1/scribus/inspage.h 2005-08-17 01:17:16.000000000 +0200 ++++ scribus-1.3.1-gcc41/scribus/inspage.h 2005-12-20 23:53:55.383767250 +0100 +@@ -45,7 +45,7 @@ + QString prefsPageSizeName; + QPtrList<QComboBox> masterPageCombos; + +- const QStringList InsPage::getMasterPages(); ++ const QStringList getMasterPages(); + const QString getMasterPageN(uint n); + const int getWhere(); + const int getWherePage(); +diff -Naur scribus-1.3.1/scribus/pdfoptionsio.h scribus-1.3.1-gcc41/scribus/pdfoptionsio.h +--- scribus-1.3.1/scribus/pdfoptionsio.h 2005-08-10 09:14:56.000000000 +0200 ++++ scribus-1.3.1-gcc41/scribus/pdfoptionsio.h 2005-12-20 23:56:51.582779000 +0100 +@@ -80,7 +80,7 @@ + // Build and return an XML representation of the settings. + // QString::null is returned on failure, in which case + // the error string is set. +- QString PDFOptionsIO::buildXMLString(); ++ QString buildXMLString(); + + // Populate the current DOM tree with the settings from the + // current PDFOptions instance. +diff -Naur scribus-1.3.1/scribus/picstatus.h scribus-1.3.1-gcc41/scribus/picstatus.h +--- scribus-1.3.1/scribus/picstatus.h 2005-09-22 13:17:30.000000000 +0200 ++++ scribus-1.3.1-gcc41/scribus/picstatus.h 2005-12-20 23:57:32.409330500 +0100 +@@ -55,10 +55,10 @@ + + // Toggle a searc button in the table between "Search" and "Cancel Search", + // fixing signal connections as well. +- void PicStatus::setSearchButton(int row, bool toCancel, const FileSearch* searcher); ++ void setSearchButton(int row, bool toCancel, const FileSearch* searcher); + + // Load the image specified into the PageItem shown on row `row' +- bool PicStatus::loadPictByRow(const QString & newFilePath, unsigned int row); ++ bool loadPictByRow(const QString & newFilePath, unsigned int row); + + // Column indexes + static const unsigned short COL_FILENAME; diff --git a/app-office/scribus/files/scribus-1.3.1-memleak.patch b/app-office/scribus/files/scribus-1.3.1-memleak.patch new file mode 100644 index 000000000000..5e2528f6037a --- /dev/null +++ b/app-office/scribus/files/scribus-1.3.1-memleak.patch @@ -0,0 +1,57 @@ +--- scribus-1.3.1-orig/scribus/util.cpp 2005-09-17 05:55:05.000000000 +0200 ++++ scribus-1.3.1/scribus/util.cpp 2005-11-03 00:22:32.000000000 +0100 +@@ -1201,20 +1201,20 @@ + { + static QMap<QRgb, QPixmap*> pxCache; + +- QPixmap * pm = pxCache[rgb.rgb()]; +- if (!pm) +- { +- pm = new QPixmap(15, 15); +- pm->fill(rgb); +- QPainter p; +- p.begin(pm); +- p.setBrush(Qt::NoBrush); +- QPen b(Qt::black, 1); +- p.setPen(b); +- p.drawRect(0, 0, 15, 15); +- p.end(); +- pxCache[rgb.rgb()] = pm; +- } ++ QRgb index=rgb.rgb(); ++ if (pxCache.contains(index)) ++ return pxCache[index]; ++ ++ QPixmap *pm = new QPixmap(15, 15); ++ pm->fill(rgb); ++ QPainter p; ++ p.begin(pm); ++ p.setBrush(Qt::NoBrush); ++ QPen b(Qt::black, 1); ++ p.setPen(b); ++ p.drawRect(0, 0, 15, 15); ++ p.end(); ++ pxCache.insert(index, pm); + return pm; + } + +@@ -1222,12 +1222,13 @@ + { + static QMap<QRgb, QPixmap*> pxCache; + +- QPixmap * pm = pxCache[rgb.rgb()]; +- if (!pm) { +- pm = new QPixmap(30, 15); +- pm->fill(rgb); +- pxCache[rgb.rgb()] = pm; +- } ++ QRgb index=rgb.rgb(); ++ if (pxCache.contains(index)) ++ return pxCache[index]; ++ ++ QPixmap *pm = new QPixmap(30, 15); ++ pm->fill(rgb); ++ pxCache.insert(index, pm); + return pm; + } + |