[Psi-devel] Re: CVS (2005-01-11) Build Error
James Chaldecott
james at swythan.co.uk
Tue Jan 11 12:43:15 PST 2005
Remko Troncon wrote:
>Don't forget to update cutestuff too, and don't forget to ask CVS to
>create new directories if necessary. And the windows build of
>systemwatch isn't working yet either, James is making a patch as we speak.
>
>
>
Here you go everyone. Attached is the patch to get
systemwatch_win.[cpp|h] working.
The important changes were to add the required winEvent(MSG*)
declaration and to make the private implementation class declaration
public.
Whilst I was looking through other files using the same technique, I
realised that using a long class name for the private class was overkill
(and cumbersome), as it is always scoped by the parent class' name, so I
also changed the name of that class :
WinSystemWatch::WinSystemWatchPrivate -> WinSystemWatch::Private
Please apply to CVS, or CVS won't build on Win32.
James
-------------- next part --------------
diff -u -E systemwatch.clean/systemwatch_win.cpp systemwatch/systemwatch_win.cpp
--- systemwatch.clean/systemwatch_win.cpp 2005-01-11 20:28:33.167963200 +0000
+++ systemwatch/systemwatch_win.cpp 2005-01-11 20:32:41.915644800 +0000
@@ -28,21 +28,22 @@
// WinSystemWatchPrivate
// -----------------------------------------------------------------------------
-class WinSystemWatch::WinSystemWatchPrivate : public QWidget
+class WinSystemWatch::Private : public QWidget
{
Q_OBJECT
public:
- WinSystemWatchPrivate( ) : QWidget( 0 ) { }
- ~WinSystemWatchPrivate() { }
+ Private( ) : QWidget( 0 ) { }
+ virtual ~Private() { }
+ virtual bool winEvent( MSG *m );
signals:
void sleep();
void wakeup();
};
-bool WinSystemWatch::WinSystemWatchPrivate::winEvent( MSG *m )
+bool WinSystemWatch::Private::winEvent( MSG *m )
{
if(WM_POWERBROADCAST == m->message) {
switch (m->wParam) {
@@ -87,7 +88,7 @@
WinSystemWatch::WinSystemWatch()
{
- d = new WinSystemWatchPrivate();
+ d = new Private();
connect(d,SIGNAL(sleep()),this,SIGNAL(sleep()));
connect(d,SIGNAL(wakeup()),this,SIGNAL(wakeup()));
}
diff -u -E systemwatch.clean/systemwatch_win.h systemwatch/systemwatch_win.h
--- systemwatch.clean/systemwatch_win.h 2005-01-03 13:35:02.000000000 +0000
+++ systemwatch/systemwatch_win.h 2005-01-11 19:40:29.266595200 +0000
@@ -16,8 +16,11 @@
WinSystemWatch();
static WinSystemWatch* instance_;
- class WinSystemWatchPrivate;
- WinSystemWatchPrivate *d;
+
+public:
+ class Private;
+private:
+ Private *d;
};
#endif
More information about the Psi-devel-affinix.com
mailing list