fix build on non-x11

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=671173
wilder-portage
Benjamin Reed 19 years ago
parent a712ccb7b4
commit 9b393e6ba2
  1. 4
      src/Application.cpp
  2. 4
      src/Application.h
  3. 11
      src/start.cpp

@ -46,8 +46,12 @@
using namespace Konsole;
#ifdef Q_WS_X11
Application::Application(Display* display , Qt::HANDLE visual, Qt::HANDLE colormap)
: KUniqueApplication(display,visual,colormap)
#else
Application::Application() : KUniqueApplication()
#endif
, _sessionList(0)
, _backgroundInstance(0)
{

@ -51,7 +51,11 @@ Q_OBJECT
public:
/** Constructs a new Konsole application. */
#ifdef Q_WS_X11
Application(Display* display , Qt::HANDLE visual, Qt::HANDLE colormap);
#else
Application();
#endif
virtual ~Application();

@ -21,8 +21,10 @@
#include "Application.h"
// X11
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#include <X11/extensions/Xrender.h>
#endif
// KDE
#include <KAboutData>
@ -38,8 +40,10 @@ using namespace Konsole;
// fills the KAboutData structure with information about contributors to
// Konsole
void fillAboutData(KAboutData& aboutData);
#ifdef Q_WS_X11
void getDisplayInformation(Display*& display , Visual*& visual , Colormap& colormap,
bool& transparencyAvailable);
#endif
static KCmdLineOptions options[] =
{
@ -82,6 +86,7 @@ extern "C" int KDE_EXPORT kdemain(int argc,char** argv)
exit(0);
}
#ifdef Q_WS_X11
//Display* display = 0;
Display* display = XOpenDisplay(0);
Visual* visual = 0;
@ -93,6 +98,10 @@ extern "C" int KDE_EXPORT kdemain(int argc,char** argv)
qDebug() << "Transparency available: " << transparencyAvailable;
Application app(display,Qt::HANDLE(visual),Qt::HANDLE(colormap));
#else
Application app;
#endif
return app.exec();
}
@ -162,6 +171,7 @@ void fillAboutData(KAboutData& aboutData)
}
// code taken from the Qt 4 graphics dojo examples
#ifdef Q_WS_X11
void getDisplayInformation(Display*& display , Visual*& visual , Colormap& colormap,
bool& transparencyAvailable)
{
@ -200,3 +210,4 @@ void getDisplayInformation(Display*& display , Visual*& visual , Colormap& color
}
}
}
#endif

Loading…
Cancel
Save