z1dev / zkanji

Japanese language study suite and dictionary
GNU General Public License v3.0
60 stars 10 forks source link

ERROR -- Build Error @ settings.cpp #25

Closed am2del closed 6 years ago

am2del commented 6 years ago

When building just ~5min ago (see time of post), I get error and abort so until fixed I cannot verify the things requested. (Don't got the time to trouble-shoot, sorry...)

QT5 version: 5.10.1-1~5 QT Creator: 4.5.2-1 <-- Same error. Build string: qmake "zkanji.pro" -spec linux-g++ -Wall CONFIG+=debug CONFIG+=qml_debug && make Log:

[...]
settings.cpp: In function ‘void Settings::loadIniFile()’:
settings.cpp:1047:37: error: cannot bind non-const lvalue reference of type ‘std::vector<char>&’ to an rvalue of type ‘std::vector<char>’
             kanji.showref.swap(std::vector<char>(kanjirefcnt, (const char)1));
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7.3.0/vector:64:0,
                 from /usr/include/qt/QtCore/qmetatype.h:53,
                 from /usr/include/qt/QtCore/qobject.h:54,
                 from /usr/include/qt/QtCore/qiodevice.h:45,
                 from /usr/include/qt/QtCore/qxmlstream.h:43,
                 from /usr/include/qt/QtCore/QXmlStreamWriter:1,
                 from settings.cpp:7:
/usr/include/c++/7.3.0/bits/stl_vector.h:1229:7: note:   initializing argument 1 of ‘void std::vector<_Tp, _Alloc>::swap(std::vector<_Tp, _Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>]’
       swap(vector& __x) _GLIBCXX_NOEXCEPT
       ^~~~
settings.cpp: In function ‘void Settings::loadSettingsFromFile()’:
settings.cpp:1302:20: warning: enumeration value ‘NoError’ not handled in switch [-Wswitch]
             switch (reader.error())
                    ^
settings.cpp: In function ‘QFont Settings::kanjiFont(bool)’:
settings.cpp:1334:26: warning: unused parameter ‘scaled’ [-Wunused-parameter]
     QFont kanjiFont(bool scaled)
                          ^~~~~~
make: *** [Makefile:3332: settings.o] Error 1
  [ERROR]  Error during build using 'make'! Exiting!

Hopefully I get an hour or two tomorrow to check the things which you wanted verified.

Sorry. Too busy with work lately and probably until the end of this month.

z1dev commented 6 years ago

I'm answering late because I didn't notice this issue. Github should be set to notify me when a new one is created, but it forgot(?)

I noticed this error when trying to build on my virtual Linux. It should be fixed by now.

am2del commented 6 years ago

Build (UTC): 2018-03-22 @ 15:34

Building works out fine, thank you - go ahead and close this one.