can't use windowId in QML on Windows

This commit is contained in:
Marco Martin 2012-04-06 13:08:49 +02:00
parent 091bde342d
commit 531031f753
2 changed files with 7 additions and 1 deletions

View File

@ -350,10 +350,12 @@ int DialogProxy::windowFlags() const
return (int)m_flags; return (int)m_flags;
} }
#ifndef Q_WS_WIN
qulonglong DialogProxy::windowId() const qulonglong DialogProxy::windowId() const
{ {
return m_dialog->winId(); return m_dialog->winId();
} }
#endif
void DialogProxy::setWindowFlags(const int flags) void DialogProxy::setWindowFlags(const int flags)
{ {

View File

@ -139,11 +139,13 @@ class DialogProxy : public QObject
* Plasma Location of the dialog window. Useful if this dialog is apopup for a panel * Plasma Location of the dialog window. Useful if this dialog is apopup for a panel
*/ */
Q_PROPERTY(int location READ location WRITE setLocation NOTIFY locationChanged) Q_PROPERTY(int location READ location WRITE setLocation NOTIFY locationChanged)
//This won't be available on windows, but should be used only by kwin and never by applets anyways
#ifndef Q_WS_WIN
/** /**
* Window ID of the dialog window. * Window ID of the dialog window.
**/ **/
Q_PROPERTY(qulonglong windowId READ windowId CONSTANT) Q_PROPERTY(qulonglong windowId READ windowId CONSTANT)
#endif
public: public:
enum WidgetAttribute { enum WidgetAttribute {
@ -185,7 +187,9 @@ public:
QObject *margins() const; QObject *margins() const;
#ifndef Q_WS_WIN
qulonglong windowId() const; qulonglong windowId() const;
#endif
/** /**
* @returns The suggested screen position for the popup * @returns The suggested screen position for the popup