src/plugins/gfxdrivers/vnc/main.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
    41 
    41 
    42 #include <qscreendriverplugin_qws.h>
    42 #include <qscreendriverplugin_qws.h>
    43 #include <qscreenvnc_qws.h>
    43 #include <qscreenvnc_qws.h>
    44 #include <qstringlist.h>
    44 #include <qstringlist.h>
    45 
    45 
       
    46 #ifndef QT_NO_LIBRARY
    46 QT_BEGIN_NAMESPACE
    47 QT_BEGIN_NAMESPACE
    47 
    48 
    48 class GfxVncDriver : public QScreenDriverPlugin
    49 class GfxVncDriver : public QScreenDriverPlugin
    49 {
    50 {
    50 public:
    51 public:
    66     return list;
    67     return list;
    67 }
    68 }
    68 
    69 
    69 QScreen* GfxVncDriver::create(const QString& driver, int displayId)
    70 QScreen* GfxVncDriver::create(const QString& driver, int displayId)
    70 {
    71 {
       
    72 #ifndef QT_NO_QWS_VNC
    71     if (driver.toLower() == "vnc")
    73     if (driver.toLower() == "vnc")
    72         return new QVNCScreen(displayId);
    74         return new QVNCScreen(displayId);
    73 
    75 #else //QT_NO_QWS_VNC
       
    76     printf("QT buildt with QT_NO_QWS_VNC. No screen driver returned\n");
       
    77 #endif //QT_NO_QWS_VNC
    74     return 0;
    78     return 0;
    75 }
    79 }
    76 
    80 
    77 Q_EXPORT_STATIC_PLUGIN(GfxVncDriver)
    81 Q_EXPORT_STATIC_PLUGIN(GfxVncDriver)
    78 Q_EXPORT_PLUGIN2(qgfxvnc, GfxVncDriver)
    82 Q_EXPORT_PLUGIN2(qgfxvnc, GfxVncDriver)
    79 
    83 
    80 QT_END_NAMESPACE
    84 QT_END_NAMESPACE
       
    85 
       
    86 #endif //QT_NO_LIBRARY