Remove unused QWidget dependecy from Todo example app

Reviewers: vandenoever

Reviewed By: vandenoever

Differential Revision: https://phabricator.kde.org/D15552
master
Friedrich W. H. Kossebau 2018-09-16 13:36:54 +02:00
parent dff4e2a0d2
commit c970b1c417
2 changed files with 4 additions and 6 deletions

View File

@ -25,11 +25,10 @@ find_package(Threads REQUIRED)
set(QT_MIN_VERSION "5.6.0")
find_package(Qt5 ${QT_MIN_VERSION} CONFIG
REQUIRED COMPONENTS Core Quick Widgets
REQUIRED COMPONENTS Core Quick
)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
find_package(RustQtBindingGenerator REQUIRED)
@ -62,7 +61,7 @@ add_custom_command(
add_custom_target(rust_target DEPENDS "${RUST_LIB}")
list(APPEND Libs "${RUST_LIB}")
list(APPEND Libs Qt5::Core Qt5::Quick Qt5::Widgets Threads::Threads ${CMAKE_DL_LIBS})
list(APPEND Libs Qt5::Core Qt5::Quick Threads::Threads ${CMAKE_DL_LIBS})
set(SRCS src/main.cpp src/Bindings.cpp "qml.qrc")
add_executable(todos ${SRCS})
add_dependencies(todos rust_target)

View File

@ -1,12 +1,11 @@
#include "Bindings.h"
#include <QtQml/qqml.h>
#include <QApplication>
#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QGuiApplication app(argc, argv);
qmlRegisterType<Todos>("RustCode", 1, 0, "Todos");
QQmlApplicationEngine engine;