From c025348765b9ab8531a67bdc783048577dec5f66 Mon Sep 17 00:00:00 2001
From: Romain DERRE <romain.derre@pc228-14.pedago.ensiie.fr>
Date: Fri, 29 Mar 2019 19:43:37 +0100
Subject: [PATCH] icone

---
 app/app.pro        | 4 ++--
 app/icon.qrc       | 5 +++++
 app/mainwindow.cpp | 2 +-
 app/mainwindow.ui  | 2 +-
 4 files changed, 9 insertions(+), 4 deletions(-)
 create mode 100644 app/icon.qrc

diff --git a/app/app.pro b/app/app.pro
index 20074c4..e192cb8 100644
--- a/app/app.pro
+++ b/app/app.pro
@@ -49,5 +49,5 @@ HEADERS += \
 FORMS += \
         mainwindow.ui
 
-DISTFILES += \
-    icon.ico
+RESOURCES += \
+    icon.qrc
diff --git a/app/icon.qrc b/app/icon.qrc
new file mode 100644
index 0000000..3f69c5f
--- /dev/null
+++ b/app/icon.qrc
@@ -0,0 +1,5 @@
+<RCC>
+    <qresource prefix="/">
+        <file>icon.ico</file>
+    </qresource>
+</RCC>
diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp
index bb424b6..d970837 100644
--- a/app/mainwindow.cpp
+++ b/app/mainwindow.cpp
@@ -65,7 +65,7 @@ void MainWindow::on_commandLinkButton_7_clicked()
     bool ok;
     QString text = QInputDialog::getText(this, tr("Create task"),
                                          tr("Task command:"), QLineEdit::Normal,
-                                         QDir::home().dirName(), &ok);
+                                         "", &ok);
     text+=" &";
     if (ok && !text.isEmpty())
         system(text.toStdString().c_str());
diff --git a/app/mainwindow.ui b/app/mainwindow.ui
index 95cc114..ca4164a 100644
--- a/app/mainwindow.ui
+++ b/app/mainwindow.ui
@@ -15,7 +15,7 @@
   </property>
   <property name="windowIcon">
    <iconset>
-    <normalon>icon.ico</normalon>
+    <normalon>:/icon.ico</normalon>
    </iconset>
   </property>
   <widget class="QWidget" name="centralWidget">
-- 
GitLab