Version: 1.3.1 (using KDE KDE 3.2.1KDE 1.2) Installed from: I Don't KnowRedHat RPMs Compiler: gcc 3.2.3 OS: Linux configure.in lists KDE/Qt 3.1 as minimum requirement for Koffice 1.3.1, but compilation fails in lib/kofficecore/koDocument.cc, lines 432, 1146 , 1349, because QString::arg(const QString &, const QString &) is not available in Qt < 3.2. Either the version requirement should be stepped up, or the respective lines should be modified to call arg(const QString &) separately for each argument. Will provide a patch, if this is the only issue occuring during compilation (currently underway.)
Fixed into koffice 1.3 branch. I continue to compile koffice 1.3 with qt 3.1. Regards.
Created attachment 7750 [details] qt-3.1 fixes
Created attachment 7751 [details] KDE-3.1 fixes
the above issues are introduced in koffice-3.1.2 ...
CVS commit by goutte: Compile again with Qt 3.1. (I am sorry to have broken it.) CCMAIL:83972@bugs.kde.org M +5 -0 koUnitWidgets.cc 1.5.2.4 --- koffice/lib/kofficeui/koUnitWidgets.cc #1.5.2.3:1.5.2.4 @@ -131,5 +131,10 @@ KoUnitDoubleValidator::validate( QString QString KoUnitDoubleBase::getVisibleText( double value ) const { +#if QT_VERSION > 0x030102 const QString num ( QString( "%1%2").arg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) ); +#else + const QString num ( QString( "%1%2").arg( KGlobal::locale()->formatNumber( value, m_precision ) ).arg( KoUnit::unitName( m_unit ) ) ); +#endif + kdDebug(30004) << "getVisibleText: " << QString::number( value, 'f', 12 ) << " => " << num << endl; return num;
KDE 3.1 still missing...
CVS commit by goutte: Make it compile on KDE 3.1 CCMAIL:83972@bugs.kde.org M +5 -5 webpresentation.cc 1.103.2.8 --- koffice/kpresenter/webpresentation.cc #1.103.2.7:1.103.2.8 @@ -256,5 +256,5 @@ void KPWebPresentation::initCreation( KP int p; KURL str( path + "/html" ); - KIO::NetAccess::mkdir( str,( QWidget* )0L ); + KIO::NetAccess::mkdir( str ); p = progressBar->progress(); @@ -263,5 +263,5 @@ void KPWebPresentation::initCreation( KP str = path + "/pics"; - KIO::NetAccess::mkdir( str,( QWidget* )0L ); + KIO::NetAccess::mkdir( str ); @@ -911,5 +911,5 @@ void KPWebPresentationWizard::pageChange // path doesn't exist. ask user if it should be created. - if ( !KIO::NetAccess::exists( pathname, true/*write*/,this ) ) + if ( !KIO::NetAccess::exists( pathname, true/*write*/ ) ) { QString msg = i18n( "<qt>The directory <b>%1</b> does not exist.<br>" @@ -919,5 +919,5 @@ void KPWebPresentationWizard::pageChange == KMessageBox::Yes) { - bool ok = KIO::NetAccess::mkdir( pathname, this ); + bool ok = KIO::NetAccess::mkdir( pathname ); if( !ok ) {
Now it should work on Qt 3.1 and KDE 3.1. Can you test that it is really so. (I am also thinking about a release if KOffice does not work on Qt 3.1/KDE 3.1 for any version after KOffice 1.3.) Have a nice day!
There are still problems...
The current KOffice in KOFFICE_1_3_BRANCH cannot compile on KDE 3.1 and Qt 3.1 in the directory koffice/lib/kotext. I suppose that it is due to the Indic support, which was only introduced in Qt 3.2. Have a nice day! Created an attachment (id=7775) make.err
Let's assign this bug to myself. (No need to cross-post to the koffice mailing list.)
You are right, the indic support broke any chance of KOffice-1.3-branch being compilable with Qt 3.1. Can I suggest to drop Qt-3.1 compatibility? The part of KOffice 1.3.1 which changed most code, *is* the indic support. Trying to support both Qt-3.1 and Qt-3.2 would be basically merging the KOffice-1.3 and KOffice-1.3.1 code, which would be IMHO wasted time. Qt is at 3.3.x now, 3.1 is really getting old. Sorry that I didn't realize this when I added the Indic support, but there's no going back now.
On Monday 04 October 2004 00:07, David Faure wrote: (...) > You are right, the indic support broke any chance of KOffice-1.3-branch > being compilable with Qt 3.1. > > Can I suggest to drop Qt-3.1 compatibility? The part of KOffice 1.3.1 which > changed most code, *is* the indic support. Trying to support both Qt-3.1 > and Qt-3.2 would be basically merging the KOffice-1.3 and KOffice-1.3.1 > code, which would be IMHO wasted time. Qt is at 3.3.x now, 3.1 is really > getting old. Well, Indic came only for KOffice 1.3.3. And 1.3.1 and 1.3.2 are not compilable with Qt 3.1, unlike advertised. > > Sorry that I didn't realize this when I added the Indic support, but > there's no going back now. It still can be trown out. It is one new feature against many bug fixes. Have a nice day!
CVS commit by goutte: Last step to be able to compile KoText on Qt 3.1 CCMAIL:83972@bugs.kde.org M +29 -0 kotextobject.cc 1.137.2.3 --- koffice/lib/kotext/kotextobject.cc #1.137.2.2:1.137.2.3 @@ -18,4 +18,9 @@ */ +#include <qglobal.h> +#if QT_VERSION >= 0x030200 +#define INDIC +#endif + #include <qtimer.h> #include <qregexp.h> @@ -454,5 +459,10 @@ void KoTextObject::doKeyboardAction( KoT emit newCommand(cmd); } +#ifndef INDIC + else if ( !cursor->atParagStart() || parag->prev() ) + // Nothing to do if at the beginning of the very first parag +#else else if ( !cursor->atParagStart() ) +#endif { checkUndoRedoInfo( cursor, UndoRedoInfo::Delete ); @@ -464,4 +474,20 @@ void KoTextObject::doKeyboardAction( KoT undoRedoInfo.oldParagLayouts << parag->paragLayout(); } +#ifndef INDIC + cursor->gotoPreviousLetter(); + KoTextStringChar * ch = cursor->parag()->at( cursor->index() ); + undoRedoInfo.text.prepend( QString( ch->c ) ); + copyCharFormatting( cursor->parag(), cursor->index(), 0, true ); + undoRedoInfo.index = cursor->index(); + KoParagLayout paragLayout = cursor->parag()->paragLayout(); + if ( cursor->remove() ) { + undoRedoInfo.text.remove( 0, 1 ); + undoRedoInfo.text.prepend( "\n" ); + undoRedoInfo.index = cursor->index(); + undoRedoInfo.id = cursor->parag()->paragId(); + undoRedoInfo.oldParagLayouts.prepend( paragLayout ); + } else + emit paragraphModified( cursor->parag(), RemoveChar, cursor->index(),1 ); +#else undoRedoInfo.text.insert( 0, cursor->parag()->at( cursor->index()-1 ) ); copyCharFormatting( cursor->parag(), cursor->index()-1, 0, true ); @@ -470,5 +496,7 @@ void KoTextObject::doKeyboardAction( KoT cursor->removePreviousChar(); emit paragraphModified( cursor->parag(), RemoveChar, cursor->index(),1 ); +#endif m_lastFormatted = cursor->parag(); +#ifdef INDIC } else if ( parag->prev() ) { // joining paragraphs emit paragraphDeleted( cursor->parag() ); @@ -479,4 +507,5 @@ void KoTextObject::doKeyboardAction( KoT removeSelectedText( cursor, KoTextDocument::Temp, i18n( "Delete Text" ) ); emit paragraphModified( cursor->parag(), AddChar, cursor->index(), cursor->parag()->length() - cursor->index() ); +#endif } } break;
On Monday 04 October 2004 00:47, Nicolas Goutte wrote: > Well, Indic came only for KOffice 1.3.3. And 1.3.1 and 1.3.2 are not > compilable with Qt 3.1, unlike advertised. So? Too late for 1.3.1 and 1.3.2 anyway, so we could simply update our webpages and say that 1.3.2 (or 1.3.3) require Qt 3.2. But I've seen you ifdef'ed the whole code (good idea, patch --ifdef). I just hope it doesn't break anything. > > > > Sorry that I didn't realize this when I added the Indic support, but > > there's no going back now. > > It still can be trown out. It is one new feature against many bug fixes. I disagree. You don't have to choose "one feature" against "many bug fixes". You can get the feature *and* the many bugfixes, simply by requiring Qt 3.2. Support for a new language makes the application work for a whole new set of users for whom it wasn't useable at all previously - that's not just "one new feature", it's making the application useable for those people.
For me, it compiles now: KDE last KDE_3_1_BRANCH, Qt 3.1.2 (directly from Trolltech) Have a nice day!