labsin / qmljsreformatte

CLI Qml reformatter borrowed from QtCreator
1 stars 0 forks source link

QtCreator 4.2.1 // Qt 5.8 #1

Open julien-deramond opened 7 years ago

julien-deramond commented 7 years ago

I tried to install the project with the following context:

There is actually an undefined reference with _Utils::Icons::EDIT_CLEAR__ and a missing sleep.cpp file.

It is possible to fix the problem by modifying the CMakeLists.txt file:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f528894..7e9aa72 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,7 +86,8 @@ set(UTILS_SRCS
     #qt-creator/src/libs/utils/newclasswidget.cpp 
     qt-creator/src/libs/utils/classnamevalidatinglineedit.cpp 
     qt-creator/src/libs/utils/linecolumnlabel.cpp 
-    qt-creator/src/libs/utils/fancylineedit.cpp 
+    qt-creator/src/libs/utils/fancylineedit.cpp
+    qt-creator/src/libs/utils/utilsicons.cpp 
     qt-creator/src/libs/utils/qtcolorbutton.cpp 
     qt-creator/src/libs/utils/savedaction.cpp 
     qt-creator/src/libs/utils/synchronousprocess.cpp 
@@ -121,7 +122,6 @@ set(UTILS_SRCS
     qt-creator/src/libs/utils/json.cpp 
     qt-creator/src/libs/utils/portlist.cpp 
     qt-creator/src/libs/utils/appmainwindow.cpp 
-    qt-creator/src/libs/utils/sleep.cpp 
     qt-creator/src/libs/utils/basetreeview.cpp 
     qt-creator/src/libs/utils/qtcassert.cpp 
     qt-creator/src/libs/utils/elfreader.cpp
labsin commented 7 years ago

The qt-creator sources have have probably changes. I should probably add a commit to check out in the qt-creator submodule so this problem doesn't repeat itself. Tbh I haven't used this much.

julien-deramond commented 7 years ago

In fact I mainly created this issue to inform you about the new changes of qt-creator sources and especially because it maybe could help the people who will try this project. Of course, it doesn't need a modification if you don't use it anymore :smiley:

Anyway thanks for having shared your work on the reformater.

labsin commented 7 years ago

Just out of interest. Did you update the qt-creator submodule by hand? Did you have to because the Qt5.8? Here it's Qt5.6 and it's building fine.

julien-deramond commented 7 years ago

In fact, I'm currently working on a study about the QML formaters/checkers... and already had the last version of Qt and qt-creator (sources). I needed to modify especially the last version possible of ./src/libs/qmljs/qmljsreformatter.cpp so I used your project with the following manipulations:

$ git clone https://github.com/labsin/qmljsreformatte
$ cp -R ~/qt-creator-opensource-src-4.2.1/* qmljsreformatte/qt-creator/
$ mkdir build && cd build
$ CMAKE_PREFIX_PATH=/home/myuser/Qt-install/5.8/gcc_64/lib/cmake cmake ..
$ make

The fact that I didn't use the git option --recursive of course didn't download the qt-creator linked to your project.