| | |
| | | |
| | | namespace QWK { |
| | | |
| | | WindowAgentBasePrivate::WindowContextFactoryMethod |
| | | WindowAgentBasePrivate::windowContextFactoryMethod = nullptr; |
| | | |
| | | WindowAgentBasePrivate::WindowAgentBasePrivate() : q_ptr(nullptr), context(nullptr) { |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | AbstractWindowContext *WindowAgentBasePrivate::createContext() const { |
| | | return |
| | | if (windowContextFactoryMethod) { |
| | | return windowContextFactoryMethod(); |
| | | } |
| | | #ifdef Q_OS_WINDOWS |
| | | new Win32WindowContext() |
| | | return new Win32WindowContext(); |
| | | #else |
| | | new QtWindowContext() |
| | | return new QtWindowContext(); |
| | | #endif |
| | | ; |
| | | } |
| | | |
| | | |
| | | bool WindowAgentBasePrivate::setup(QObject *host, WindowItemDelegate *delegate) { |
| | | std::unique_ptr<AbstractWindowContext> ctx(createContext()); |