Move registerMetaType for SurfaceInterface* to main.cpp

Toplevel has the SurfaceInterface* exposed as a property which results
in a (incorrect) runtime warning on X11 about not registered meta type.
This commit is contained in:
Martin Gräßlin 2016-08-26 15:27:07 +02:00
parent 440cca918e
commit 1c1dca6da4
2 changed files with 2 additions and 1 deletions

View file

@ -42,6 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KLocalizedString>
#include <KPluginMetaData>
#include <KSharedConfig>
#include <KWayland/Server/surface_interface.h>
// Qt
#include <qplatformdefs.h>
#include <qcommandlineparser.h>
@ -105,6 +106,7 @@ Application::Application(Application::OperationMode mode, int &argc, char **argv
{
qRegisterMetaType<Options::WindowOperation>("Options::WindowOperation");
qRegisterMetaType<KWin::EffectWindow*>();
qRegisterMetaType<KWayland::Server::SurfaceInterface *>("KWayland::Server::SurfaceInterface *");
}
void Application::setConfigLock(bool lock)

View file

@ -73,7 +73,6 @@ KWIN_SINGLETON_FACTORY(WaylandServer)
WaylandServer::WaylandServer(QObject *parent)
: QObject(parent)
{
qRegisterMetaType<KWayland::Server::SurfaceInterface *>("KWayland::Server::SurfaceInterface *");
qRegisterMetaType<KWayland::Server::OutputInterface::DpmsMode>();
connect(kwinApp(), &Application::screensCreated, this, &WaylandServer::initOutputs);