Hallo,
Ik heb een vreemd probleem waar ik niet uitkom. Op een een of andere manier
wordt een definitie van een class niet herkend. Hij ziet KConfig niet als
een type, terwijl het dat wel is....
Weet iemand hoe ik dit oplos? De
details staan hier onder.
André
details van het probleem
==================
Ik krijg de onderstaande error:
De kglobal.h ziet er alsvolgt uit:
KConfig is gedeclareerd in de file kconfig.h (die zoals je ziet in de
includes staat):
Anyone please?!
Ik heb een vreemd probleem waar ik niet uitkom. Op een een of andere manier
wordt een definitie van een class niet herkend. Hij ziet KConfig niet als
een type, terwijl het dat wel is....
details staan hier onder.
André
details van het probleem
==================
Ik krijg de onderstaande error:
code:
1
2
3
4
5
6
7
8
9
| make[1]: Entering directory `/home/andre/development/QtE/cumulus-0.0.1/kflog' g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -DNO_DEBUG -I../microkde -I../qtcompat -I.. -I./guicontrols -I/opt/Qtopia/include -o dataview.o dataview.cpp In file included from dataview.cpp:21: ../microkde/kglobal.h:12: ISO C++ forbids declaration of `KConfig' with no type ../microkde/kglobal.h:12: parse error before `*' |
De kglobal.h ziet er alsvolgt uit:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
| #ifndef MINIKDE_KGLOBAL_H
#define MINIKDE_KGLOBAL_H
#include "klocale.h"
#include "kconfig.h"
#include "kiconloader.h"
#include "kstandarddirs.h"
class KGlobal {
public:
static KLocale *locale();
static KConfig *config(); // <--- dit is regel 12
static KIconLoader *iconLoader();
static KStandardDirs *dirs();
static void setAppName( const QString & );
private:
static KLocale *mLocale;
static KConfig *mConfig; <-- dit is regel 20, geeft dezelfde error
static KIconLoader *mIconLoader;
static KStandardDirs *mDirs;
static QString mAppName;
};
#endif |
KConfig is gedeclareerd in de file kconfig.h (die zoals je ziet in de
includes staat):
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
| #ifndef MINIKDE_KCONFIG_H
#define MINIKDE_KCONFIG_H
#include <qstring.h>
#include <qstringlist.h>
#include <qvaluelist.h>
#include <qcolor.h>
#include <qfont.h>
#include <qmap.h>
class KConfig {
public:
KConfig( const QString & );
~KConfig();
void setGroup( const QString & );
QValueList<int> readIntListEntry( const QString & );
int readNumEntry( const QString &, int def=0 );
QString readEntry( const QString &, const QString &def=QString::null );
QStringList readListEntry( const QString & );
bool readBoolEntry( const QString &, bool def=false );
QColor readColorEntry( const QString &, QColor * );
QFont readFontEntry( const QString &, QFont * );
void writeEntry( const QString &, QValueList<int> );
void writeEntry( const QString &, int );
void writeEntry( const QString &, const QString & );
void writeEntry( const QString &, const QStringList & );
void writeEntry( const QString &, bool );
void writeEntry( const QString &, const QColor & );
void writeEntry( const QString &, const QFont & );
void load();
void sync();
private:
static QString mGroup;
QString mFileName;
QMap<QString,bool> mBoolMap;
QMap<QString,QString> mStringMap;
bool mDirty;
};
#endif |
Anyone please?!
My opinions may have changed, but not the fact that I am right. -- Ashleigh Brilliant