From 676be5604cbdb3213c00775e0ff66f4e766f8dcb Mon Sep 17 00:00:00 2001
From: zecke <zecke>
Date: Tue, 15 Oct 2002 21:42:20 +0000
Subject: Actually most of them are -+ cause I opened them in xemacs..

The main goal is to
replace some header names to let them be overwritten by external once
so "qpeapplication.h" is now <qpe/qpeapplication.h>
I'll check if it's building on non Qt2/X11 systems...
---
(limited to 'library')

diff --git a/library/alarmserver.cpp b/library/alarmserver.cpp
index 1ee05c6..177a0cb 100644
--- a/library/alarmserver.cpp
+++ b/library/alarmserver.cpp
@@ -24,12 +24,12 @@
 #include <qtextstream.h>
 
 
-#include "qpeapplication.h"
+#include <qpe/qpeapplication.h>
 #include "global.h"
 #include "resource.h"
 
 #if defined(Q_WS_QWS) && !defined(QT_NO_COP)
-#include "qcopenvelope_qws.h"
+#include <qpe/qcopenvelope_qws.h>
 #endif
 #include "alarmserver.h"
 #include <qpe/timeconversion.h>
diff --git a/library/backend/vcc.y b/library/backend/vcc.y
index 5bcf0cb..6781312 100644
--- a/library/backend/vcc.y
+++ b/library/backend/vcc.y
@@ -122,7 +122,7 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
 //#ifdef PALMTOPCENTER
 //#include <qpe/vobject_p.h>
 //#else
-#include "vobject_p.h"
+#include <qtopia/private/vobject_p.h>
 //#endif
 
 /****  Types, Constants  ****/
diff --git a/library/backend/vcc_yacc.cpp b/library/backend/vcc_yacc.cpp
index 19a108f..b2b0c14 100644
--- a/library/backend/vcc_yacc.cpp
+++ b/library/backend/vcc_yacc.cpp
@@ -158,7 +158,7 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
 /*#ifdef PALMTOPCENTER
*/
 /*#include <qpe/vobject_p.h>
*/
 /*#else
*/
-#include "vobject_p.h"
+#include <qtopia/private/vobject_p.h>
 /*#endif
*/
 
 /****  Types, Constants  ****/
diff --git a/library/backend/vobject.cpp b/library/backend/vobject.cpp
index e6f6b78..dab128e 100644
--- a/library/backend/vobject.cpp
+++ b/library/backend/vobject.cpp
@@ -1,44 +1,44 @@
 /***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International             
-Business Machines Corporation and Siemens Rolm Communications Inc.             
-                                                                               
-For purposes of this license notice, the term Licensors shall mean,            
-collectively, Apple Computer, Inc., AT&T Corp., International                  
-Business Machines Corporation and Siemens Rolm Communications Inc.             
-The term Licensor shall mean any of the Licensors.                             
-                                                                               
-Subject to acceptance of the following conditions, permission is hereby        
-granted by Licensors without the need for written agreement and without        
-license or royalty fees, to use, copy, modify and distribute this              
-software for any purpose.                                                      
-                                                                               
-The above copyright notice and the following four paragraphs must be           
-reproduced in all copies of this software and any software including           
-this software.                                                                 
-                                                                               
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE       
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR       
-MODIFICATIONS.                                                                 
-                                                                               
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,              
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT         
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH         
-DAMAGE.                                                                        
-                                                                               
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,       
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE            
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR             
-PURPOSE.                                                                       
-
-The software is provided with RESTRICTED RIGHTS.  Use, duplication, or         
-disclosure by the government are subject to restrictions set forth in          
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.                         
+(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
+Business Machines Corporation and Siemens Rolm Communications Inc.
+
+For purposes of this license notice, the term Licensors shall mean,
+collectively, Apple Computer, Inc., AT&T Corp., International
+Business Machines Corporation and Siemens Rolm Communications Inc.
+The term Licensor shall mean any of the Licensors.
+
+Subject to acceptance of the following conditions, permission is hereby
+granted by Licensors without the need for written agreement and without
+license or royalty fees, to use, copy, modify and distribute this
+software for any purpose.
+
+The above copyright notice and the following four paragraphs must be
+reproduced in all copies of this software and any software including
+this software.
+
+THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
+ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
+MODIFICATIONS.
+
+IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
+INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
+OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
+EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.
+
+The software is provided with RESTRICTED RIGHTS.  Use, duplication, or
+disclosure by the government are subject to restrictions set forth in
+DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
 
 ***************************************************************************/
 
 /*
  * src: vobject.c
- * doc: vobject and APIs to construct vobject, APIs pretty print 
+ * doc: vobject and APIs to construct vobject, APIs pretty print
  * vobject, and convert a vobject into its textual representation.
  */
 
@@ -46,8 +46,8 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
 #include <malloc.h>
 #endif
 
-#include "vobject_p.h"
-#include "qfiledirect_p.h"
+#include <qtopia/private/vobject_p.h>
+#include <qtopia/private/qfiledirect_p.h>
 #include <string.h>
 #include <stdio.h>
 #include <fcntl.h>
@@ -327,18 +327,18 @@ DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size
 
 DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o)
 {
-    i->start = o->prop; 
+    i->start = o->prop;
     i->next = 0;
 }
 
 DLLEXPORT(void) initVObjectIterator(VObjectIterator *i, VObject *o)
 {
-    i->start = o->next; 
+    i->start = o->next;
     i->next = 0;
 }
 
 DLLEXPORT(int) moreIteration(VObjectIterator *i)
-{ 
+{
     return (i->start && (i->next==0 || i->next!=i->start));
 }
 
@@ -403,7 +403,7 @@ DLLEXPORT(VObject*) addGroup(VObject *o, const char *g)
 	    t = addProp(t,VCGroupingProp);
 	    setVObjectStringZValue(t,lookupProp_(n));
 	    } while (n != gs);
-	deleteStr(gs);	
+	deleteStr(gs);
 	return p;
 	}
     else
@@ -799,12 +799,12 @@ static struct PreDefProp* lookupPropInfo(const char* str)
 {
     /* brute force for now, could use a hash table here. */
     int i;
-	
+
     for (i = 0; propNames[i].name; i++)
 	if (qstricmp(str, propNames[i].name) == 0) {
 	    return &propNames[i];
 	    }
-    
+
     return 0;
 }
 
@@ -812,7 +812,7 @@ static struct PreDefProp* lookupPropInfo(const char* str)
 DLLEXPORT(const char*) lookupProp_(const char* str)
 {
     int i;
-	
+
     for (i = 0; propNames[i].name; i++)
 	if (qstricmp(str, propNames[i].name) == 0) {
 	    const char* s;
@@ -826,7 +826,7 @@ DLLEXPORT(const char*) lookupProp_(const char* str)
 DLLEXPORT(const char*) lookupProp(const char* str)
 {
     int i;
-	
+
     for (i = 0; propNames[i].name; i++)
 	if (qstricmp(str, propNames[i].name) == 0) {
 	    const char *s;
@@ -1005,27 +1005,27 @@ static int writeBase64(OFile *fp, unsigned char *s, long len)
     return 1;
 }
 
-static const char *replaceChar(unsigned char c) 
+static const char *replaceChar(unsigned char c)
 {
     if (c == '\n') {
 	return "=0A=\n";
     } else if (
-	    (c >= 'A' && c <= 'Z') 
+	    (c >= 'A' && c <= 'Z')
 	    ||
-	    (c >= 'a' && c <= 'z') 
+	    (c >= 'a' && c <= 'z')
 	    ||
-	    (c >= '0' && c <= '9') 
+	    (c >= '0' && c <= '9')
 	    ||
-	    (c >= '\'' && c <= ')') 
+	    (c >= '\'' && c <= ')')
 	    ||
-	    (c >= '+' && c <= '-') 
+	    (c >= '+' && c <= '-')
 	    ||
 	    (c == '/')
 	    ||
-	    (c == '?') 
+	    (c == '?')
 	    ||
-	    (c == ' ')) 
-    { 
+	    (c == ' '))
+    {
 	return 0;
     }
 
@@ -1051,7 +1051,7 @@ static const char *replaceChar(unsigned char c)
 static void writeQPString(OFile *fp, const char *s)
 {
     /*
-	only A-Z, 0-9 and 
+	only A-Z, 0-9 and
        "'"  (ASCII code 39)
        "("  (ASCII code 40)
        ")"  (ASCII code 41)
@@ -1060,7 +1060,7 @@ static void writeQPString(OFile *fp, const char *s)
        "-"  (ASCII code 45)
        "/"  (ASCII code 47)
        "?"  (ASCII code 63)
-       
+
        should remain un-encoded.
        '=' needs to be encoded as it is the escape character.
        ';' needs to be as it is a field separator.
@@ -1093,7 +1093,7 @@ static bool includesUnprintable(VObject *o)
     }
     return FALSE;
 }
-	    
+
 static void writeVObject_(OFile *fp, VObject *o);
 
 static void writeValue(OFile *fp, VObject *o, unsigned long size)
@@ -1229,7 +1229,7 @@ static void writeProp(OFile *fp, VObject *o)
 	    }
 	}
 
-	
+
     if (VALUE_TYPE(o)) {
 	    if ( includesUnprintable(o) ) {
 	    appendsOFile(fp, ";" VCEncodingProp "=" VCQuotedPrintableProp);
diff --git a/library/datebookmonth.cpp b/library/datebookmonth.cpp
index 272c223..4a9dcbd 100644
--- a/library/datebookmonth.cpp
+++ b/library/datebookmonth.cpp
@@ -22,7 +22,7 @@
 #include "datebookdb.h"
 #include <qtopia/private/event.h>
 #include "resource.h"
-#include "qpeapplication.h"
+#include <qpe/qpeapplication.h>
 #include "timestring.h"
 
 #include <qtoolbutton.h>
@@ -554,10 +554,10 @@ void DayItemMonth::paint( QPainter *p, const QColorGroup &cg,
 	int w = cr.width();
 	Event ev = (*itDays).event();
 
-	int f = (*itDays).start().hour(); // assume Effective event 
+	int f = (*itDays).start().hour(); // assume Effective event
 	int t = (*itDays).end().hour(); 	 // is truncated.
 
-	if (ev.isAllDay()) { 
+	if (ev.isAllDay()) {
 	    if (!ev.hasRepeat())
 		normalAllDay = TRUE;
 	    else
@@ -615,9 +615,9 @@ void DayItemMonth::paint( QPainter *p, const QColorGroup &cg,
 		p->fillRect( 0, 0, cr.width(), cr.height(),
 			colorRepeatLight );
     } else {
-	p->fillRect( 0, 0, cr.width(), 
-		cr.height(), selected 
-		?  g.brush( QColorGroup::Highlight ) 
+	p->fillRect( 0, 0, cr.width(),
+		cr.height(), selected
+		?  g.brush( QColorGroup::Highlight )
 		: g.brush( QColorGroup::Base ) );
     }
 
@@ -733,7 +733,7 @@ void DateButton::setDate( QDate d )
 {
     currDate = d;
     setText( longFormat ? TimeString::longDateString( d, df ) :
-	     TimeString::shortDate( d, df ) ); 
+	     TimeString::shortDate( d, df ) );
 
 }
 
diff --git a/library/fileselector.cpp b/library/fileselector.cpp
index 7ff09b4..052a29e 100644
--- a/library/fileselector.cpp
+++ b/library/fileselector.cpp
@@ -31,15 +31,15 @@
 #include "storage.h"
 #include "qpemenubar.h"
 #ifdef QWS
-#include "qcopchannel_qws.h"
+#include <qcopchannel_qws.h>
 #endif
 #include "lnkproperties.h"
 #include "applnk.h"
-#include "qpeapplication.h"
+#include <qpe/qpeapplication.h>
 #include "categorymenu.h"
 #include "categoryselect.h"
 #include "mimetype.h"
-#include "categories.h"
+#include <qpe/categories.h>
 
 #include <stdlib.h>
 
diff --git a/library/fontdatabase.cpp b/library/fontdatabase.cpp
index c64e645..2b5e0d2 100644
--- a/library/fontdatabase.cpp
+++ b/library/fontdatabase.cpp
@@ -18,7 +18,7 @@
 **
 **********************************************************************/
 
-#include "qpeapplication.h"
+#include <qpe/qpeapplication.h>
 #include "fontfactoryinterface.h"
 #include "fontdatabase.h"
 
diff --git a/library/fontdatabase.h b/library/fontdatabase.h
index 10aec91..991847b 100644
--- a/library/fontdatabase.h
+++ b/library/fontdatabase.h
@@ -36,6 +36,7 @@ struct FontFactory
     QFontFactory *factory;
 };
 
+#undef QT_NO_FONTDATABASE
 class FontDatabase
 #ifndef QT_NO_FONTDATABASE
     : public QFontDatabase
diff --git a/library/mimetype.cpp b/library/mimetype.cpp
index 92fe5e6..ef5d619 100644
--- a/library/mimetype.cpp
+++ b/library/mimetype.cpp
@@ -22,7 +22,7 @@
 #include "mimetype.h"
 #include "applnk.h"
 #include "resource.h"
-#include "qpeapplication.h"
+#include <qpe/qpeapplication.h>
 #include "config.h"
 
 #include <qfile.h>
diff --git a/library/qpedialog.cpp b/library/qpedialog.cpp
index 0db161b..b98e42e 100644
--- a/library/qpedialog.cpp
+++ b/library/qpedialog.cpp
@@ -23,7 +23,7 @@
 #undef protected
 
 #include "qpedialog.h"
-#include "qpeapplication.h"
+#include <qpe/qpeapplication.h>
 
 QPEDialogListener::QPEDialogListener(QDialog *di ) : QObject(di)
 {
@@ -36,7 +36,7 @@ QPEDialogListener::~QPEDialogListener() {}
 
 void QPEDialogListener::appMessage( const QCString &msg, const QByteArray & )
 {
-    if (!dialog) 
+    if (!dialog)
 	return;
     if (msg == "accept()") {
 	dialog->accept();
diff --git a/library/qpestyle.cpp b/library/qpestyle.cpp
index dfd300f..665910c 100644
--- a/library/qpestyle.cpp
+++ b/library/qpestyle.cpp
@@ -19,7 +19,7 @@
 **********************************************************************/
 
 #include "qpestyle.h"
-#include "qpeapplication.h"
+#include <qpe/qpeapplication.h>
 #include <qpushbutton.h>
 
 #include <qpainter.h>
@@ -224,7 +224,7 @@ void QPEStyle::drawControl( ControlElement ce, QPainter *p,
 			    cg.brush( QColorGroup::Button ));
 
 		    //do shading; will not work for pixmap brushes
-		    QColor bg = cg.button(); 
+		    QColor bg = cg.button();
 		    //	    int h,s,v;
 		    //	    bg.hsv( &h, &s, &v );
 		    int n = r2.height()/2;
@@ -533,8 +533,8 @@ QRect QPEStyle::comboButtonRect( int x, int y, int w, int h)
 {
     return QRect(x+1, y+1, w-2-14, h-2);
 }
-      
-       
+
+
 QRect QPEStyle::comboButtonFocusRect( int x, int y, int w, int h)
 {
     return QRect(x+2, y+2, w-4-14, h-4);
@@ -918,7 +918,7 @@ void QPEStyle::drawTab( QPainter *p, const QTabBar *tb, QTab *t, bool selected )
 			 tb->colorGroup().brush( QColorGroup::Button ));
 
 	    //do shading; will not work for pixmap brushes
-	    QColor bg = tb->colorGroup().button(); 
+	    QColor bg = tb->colorGroup().button();
 	    //	    int h,s,v;
 	    //	    bg.hsv( &h, &s, &v );
 	    int n = r.height()/2;
@@ -1028,7 +1028,7 @@ int QPEStyle::extraPopupMenuItemWidth( bool checkable, int maxpmw, QMenuItem* mi
 */
 int QPEStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem* mi, const QFontMetrics& fm )
 {
-#ifndef QT_NO_MENUDATA    
+#ifndef QT_NO_MENUDATA
     int h = 0;
     if ( mi->isSeparator() )			// separator height
 	h = motifSepHeight;
@@ -1050,7 +1050,7 @@ void QPEStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int t
 				       const QPalette& pal,
 				       bool act, bool enabled, int x, int y, int w, int h)
 {
-#ifndef QT_NO_MENUDATA    
+#ifndef QT_NO_MENUDATA
     const QColorGroup & g = pal.active();
     bool dis	  = !enabled;
     QColorGroup itemg = dis ? pal.disabled() : pal.active();
diff --git a/library/resource.cpp b/library/resource.cpp
index bdcd603..0920b67 100644
--- a/library/resource.cpp
+++ b/library/resource.cpp
@@ -19,7 +19,7 @@
 **********************************************************************/
 
 #define QTOPIA_INTERNAL_MIMEEXT
-#include "qpeapplication.h"
+#include <qpe/qpeapplication.h>
 #include "resource.h"
 #include "mimetype.h"
 #include <qdir.h>
diff --git a/library/timestring.cpp b/library/timestring.cpp
index 4c6fa72..6443b6b 100644
--- a/library/timestring.cpp
+++ b/library/timestring.cpp
@@ -20,7 +20,7 @@
 
 #include "timestring.h"
 #include <qobject.h>
-#include "qpeapplication.h" //for qApp
+#include <qpe/qpeapplication.h> //for qApp
 #include "config.h"
 
 
@@ -49,7 +49,7 @@ private:
 	Config config("qpe");
 	config.setGroup( "Date" );
 	format = DateFormat(QChar(config.readEntry("Separator", "/")[0]),
-		(DateFormat::Order)config .readNumEntry("ShortOrder", DateFormat::DayMonthYear), 
+		(DateFormat::Order)config .readNumEntry("ShortOrder", DateFormat::DayMonthYear),
 		(DateFormat::Order)config.readNumEntry("LongOrder", DateFormat::DayMonthYear));
 
 	connect( qApp, SIGNAL( dateFormatChanged(DateFormat) ),
@@ -65,7 +65,7 @@ QString DateFormat::toNumberString() const
     // for each part of the order
     for (int i = 0; i < 3; i++) {
 	// switch on the relavent 3 bits.
-	switch((_shortOrder >> (i * 3)) & 0x0007) { 
+	switch((_shortOrder >> (i * 3)) & 0x0007) {
 	    case 0x0001:
 		buf += QObject::tr( "D" );
 		break;
@@ -88,24 +88,24 @@ QString DateFormat::toWordString() const
     // for each part of the order
     for (int i = 0; i < 3; i++) {
 	// switch on the relavent 3 bits.
-	switch((_longOrder >> (i * 3)) & 0x0007) { 
+	switch((_longOrder >> (i * 3)) & 0x0007) {
 	    case 0x0001:
 		buf += QObject::tr( "day" );
-		if (i < 2) { 
+		if (i < 2) {
 		    if ((_shortOrder << ((i+1) * 3)) & 0x0007)
 			buf += ", ";
-		    else 
+		    else
 			buf += " ";
 		}
 		break;
 	    case 0x0002:
 		buf += QObject::tr( "month" );
-		if (i < 2) 
+		if (i < 2)
 		    buf += " ";
 		break;
 	    case 0x0004:
 		buf += QObject::tr( "year" );
-		if (i < 2) 
+		if (i < 2)
 		    buf += ", ";
 		break;
 	}
@@ -122,7 +122,7 @@ QString DateFormat::numberDate(const QDate &d, int v) const
     // for each part of the order
     for (int i = 0; i < 3; i++) {
 	// switch on the relavent 3 bits.
-	switch((_shortOrder >> (i * 3)) & 0x0007) { 
+	switch((_shortOrder >> (i * 3)) & 0x0007) {
 	    case 0x0001:
 	      if (pad==2) buf += QString().sprintf("%02d",d.day());
 	      else buf += QString().sprintf("%d",d.day());
@@ -161,21 +161,21 @@ QString DateFormat::wordDate(const QDate &d, int v) const
 	buf += weekDay;
 	if ((_longOrder & 0x0007) == 0x0002)
 	    buf += ' ';
-	else 
+	else
 	    buf += ", ";
     }
 
     for (int i = 0; i < 3; i++) {
 	// switch on the relavent 3 bits.
-	switch((_longOrder >> (i * 3)) & 0x0007) { 
+	switch((_longOrder >> (i * 3)) & 0x0007) {
 	    case 0x0001:
 	      if (i==1) {
 		buf += QString().sprintf("%02d, ",d.day());
 	      } else {
 		buf += QString().sprintf("%2d",d.day());
-		if (separator()=='.') // 2002/1/11 
+		if (separator()=='.') // 2002/1/11
 		  buf += ". ";
-		    else 
+		    else
 			buf += " ";
 		}
 		break;
@@ -187,7 +187,7 @@ QString DateFormat::wordDate(const QDate &d, int v) const
 		    }
 		    buf += monthName;
 		}
-		if (i < 2) 
+		if (i < 2)
 		    buf += " ";
 		break;
 	    case 0x0004:
@@ -201,7 +201,7 @@ QString DateFormat::wordDate(const QDate &d, int v) const
 
 		    buf += QString::number(year);
 		}
-		if (i < 2) 
+		if (i < 2)
 		    buf += ", ";
 		break;
 	}
@@ -219,7 +219,7 @@ void DateFormat::save(QDataStream &d) const
     d << v;
 }
 
-void DateFormat::load(QDataStream &d) 
+void DateFormat::load(QDataStream &d)
 {
     ushort value;
     d >> value;
@@ -257,7 +257,7 @@ QString TimeString::dateString( const QDate &d, DateFormat dtf )
 
 QString TimeString::longDateString( const QDate &d, DateFormat dtf )
 {
-    return dtf.wordDate(d, DateFormat::showWeekDay | DateFormat::longNumber 
+    return dtf.wordDate(d, DateFormat::showWeekDay | DateFormat::longNumber
 	    | DateFormat::longWord);
 }
 
--
cgit v0.9.0.2