[kalzium] [Bug 494770] New: nuclearCalculator.cpp:179:64: error: 'class QString' has no member named 'operator==
Taurnil
bugzilla_noreply at kde.org
Mon Oct 14 20:30:00 BST 2024
https://bugs.kde.org/show_bug.cgi?id=494770
Bug ID: 494770
Summary: nuclearCalculator.cpp:179:64: error: 'class QString'
has no member named 'operator==
Classification: Applications
Product: kalzium
Version: 24.08.2
Platform: Compiled Sources
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: kalzium at kde.org
Reporter: taurnil.oronar at gmail.com
Target Milestone: ---
SUMMARY
/usr/src/kalzium-24.08.2/src/calculator/nuclearCalculator.cpp:179:64: error:
'class QString' has no member named 'operator=='; did you mean 'operator='?
179 | int halfLifeUnit = (list.at(index)->halflifeUnit().operator==("y"))
? KUnitConversion::Year : KUnitConversion::Second;
| ^~
|
operator=
make[2]: *** [src/CMakeFiles/kalzium.dir/build.make:320:
src/CMakeFiles/kalzium.dir/calculator/nuclearCalculator.cpp.o] Error 1
STEPS TO REPRODUCE
1. Compile qt6-6.8.0, frameworks 6.7.0 and plasma 6.2.0
2. Compile kalzium dependencies or optionals
OBSERVED RESULT
[3/4] Building CXX object
src/CMakeFiles/kalzium.dir/calculator/nuclearCalculator.cpp.o
FAILED: src/CMakeFiles/kalzium.dir/calculator/nuclearCalculator.cpp.o
/var/lib/lunar/compilers/g++ -DKCOREADDONS_LIB
-DKF_DEPRECATED_WARNINGS_SINCE=0x60000
-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x56500 -DQT_CORE5COMPAT_LIB
-DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DEPRECATED_WARNINGS_SINCE=0x60000
-DQT_DISABLE_DEPRECATED_BEFORE=0x50e00 -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_NO_DEBUG -DQT_NO_URL_CAST_FROM_STRING -DQT_STATEMACHINE_LIB -DQT_SVG_LIB
-DQT_WIDGETS_LIB -DQT_XML_LIB -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
-I/usr/src/kalzium-24.08.2/kalzium-24.08.2/src -I/usr/src/kalzium-24.08.2/src
-I/usr/src/kalzium-24.08.2/kalzium-24.08.2/src/kalzium_autogen/include
-I/usr/src/kalzium-24.08.2/src/tools -I/usr/src/kalzium-24.08.2/src/calculator
-I/usr/src/kalzium-24.08.2/src/psetable
-I/usr/src/kalzium-24.08.2/src/isotopetable
-I/usr/src/kalzium-24.08.2/kalzium-24.08.2/src/..
-I/usr/src/kalzium-24.08.2/kalzium-24.08.2/libscience
-I/usr/src/kalzium-24.08.2/libscience -isystem /usr/include/KF6/KConfigWidgets
-isystem /usr/include/KF6/KWidgetsAddons -isystem
/usr/lib/include/qt6/QtWidgets -isystem /usr/lib/include/qt6 -isystem
/usr/lib/include/qt6/QtCore -isystem /usr/lib/qt6/mkspecs/linux-g++ -isystem
/usr/lib/include/qt6/QtGui -isystem /usr/include/KF6/KConfig -isystem
/usr/include/KF6/KConfigGui -isystem /usr/include/KF6/KConfigCore -isystem
/usr/include/KF6/KColorScheme -isystem /usr/include/KF6/KItemViews -isystem
/usr/include/KF6/KIOWidgets -isystem /usr/include/KF6/KIOGui -isystem
/usr/include/KF6/KIOCore -isystem /usr/include/KF6/KIO -isystem
/usr/include/KF6/KCoreAddons -isystem /usr/lib/include/qt6/QtNetwork -isystem
/usr/lib/include/qt6/QtDBus -isystem /usr/include/KF6/KService -isystem
/usr/include/KF6/KJobWidgets -isystem /usr/include/KF6/Solid -isystem
/usr/include/KF6/KCompletion -isystem /usr/include/KF6/KPlotting -isystem
/usr/include/KF6/KTextWidgets -isystem /usr/include/KF6/SonnetUi -isystem
/usr/include/KF6/Sonnet -isystem /usr/include/KF6/KI18n -isystem
/usr/include/KF6/KUnitConversion -isystem /usr/include/KF6/KXmlGui -isystem
/usr/lib/include/qt6/QtXml -isystem /usr/lib/include/qt6/QtSvg -isystem
/usr/lib/include/qt6/QtCore5Compat -isystem /usr/lib/include/qt6/QtStateMachine
-O2 -march=native -fno-plt -fexceptions -pipe -Wp,-D_FORTIFY_SOURCE=2
-fstack-clash-protection -fno-operator-names -fno-exceptions -Wall -Wextra
-Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith
-Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type
-Werror=init-self -Wvla -Wdate-time -Wsuggest-override -Wlogical-op
-fdiagnostics-color=always -O3 -DNDEBUG -std=gnu++17 -fvisibility=hidden
-fvisibility-inlines-hidden -mno-direct-extern-access -MD -MT
src/CMakeFiles/kalzium.dir/calculator/nuclearCalculator.cpp.o -MF
src/CMakeFiles/kalzium.dir/calculator/nuclearCalculator.cpp.o.d -o
src/CMakeFiles/kalzium.dir/calculator/nuclearCalculator.cpp.o -c
/usr/src/kalzium-24.08.2/src/calculator/nuclearCalculator.cpp
/usr/src/kalzium-24.08.2/src/calculator/nuclearCalculator.cpp: In member
function 'void nuclearCalculator::isotopeChanged(int)':
/usr/src/kalzium-24.08.2/src/calculator/nuclearCalculator.cpp:179:64: error:
'class QString' has no member named 'operator=='; did you mean 'operator='?
179 | int halfLifeUnit = (list.at(index)->halflifeUnit().operator==("y"))
? KUnitConversion::Year : KUnitConversion::Second;
| ^~
|
operator=
ninja: build stopped: subcommand failed.
root at sidney /usr/src/kalzium-24.08.2 # cd ../
root at sidney /usr/src # rm -rf kalzium-24.08.2/
root at sidney /usr/src # tar xf /var/spool/lunar/kalzium-24.08.2.tar.xz
root at sidney /usr/src # cd kalzium-24.08.2/
root at sidney /usr/src/kalzium-24.08.2 # ccmake -B buildme
root at sidney /usr/src/kalzium-24.08.2 # make
make: *** No targets specified and no makefile found. Stop.
root at sidney /usr/src/kalzium-24.08.2 # cmake --build buildme
[ 1%] Generating mo...
[ 1%] Built target pofiles-37e5f382dc116d0134a6d3e79dcf2dab
[ 2%] Generating ts...
[ 2%] Built target tsfiles-37e5f382dc116d0134a6d3e79dcf2dab
[ 2%] Generating index.cache.bz2
Note: namesp. add : added namespace before processing The Kalzium
Handbook
[ 2%] Built target doc-index-cache-bz2
[ 3%] Generating kalzium.1
Note: namesp. add : added namespace before processing Kalzium
User's Manual
Note: Writing kalzium.1
[ 3%] Built target doc-kalzium-1
[ 3%] Built target science_autogen_timestamp_deps
[ 4%] Automatic MOC for target science
[ 4%] Built target science_autogen
[ 5%] Building CXX object
libscience/CMakeFiles/science.dir/science_autogen/mocs_compilation.cpp.o
[ 6%] Building CXX object
libscience/CMakeFiles/science.dir/kalzium_libscience_debug.cpp.o
[ 6%] Building CXX object libscience/CMakeFiles/science.dir/element.cpp.o
[ 7%] Building CXX object libscience/CMakeFiles/science.dir/spectrum.cpp.o
[ 8%] Building CXX object libscience/CMakeFiles/science.dir/isotope.cpp.o
[ 9%] Building CXX object
libscience/CMakeFiles/science.dir/spectrumparser.cpp.o
[ 10%] Building CXX object
libscience/CMakeFiles/science.dir/elementparser.cpp.o
[ 11%] Building CXX object
libscience/CMakeFiles/science.dir/isotopeparser.cpp.o
[ 11%] Building CXX object
libscience/CMakeFiles/science.dir/chemicaldataobject.cpp.o
/usr/src/kalzium-24.08.2/libscience/chemicaldataobject.cpp: In member function
'bool ChemicalDataObject::operator==(int) const':
/usr/src/kalzium-24.08.2/libscience/chemicaldataobject.cpp:58:24: warning:
'QVariant::Type QVariant::type() const' is deprecated: Use typeId() or
metaType(). [-Wdeprecated-declarations]
58 | if (d->m_value.type() != QVariant::Int) {
| ~~~~~~~~~~~~~~~^~
In file included from /usr/lib/include/qt6/QtCore/QVariant:1,
from
/usr/src/kalzium-24.08.2/libscience/chemicaldataobject.h:12,
from
/usr/src/kalzium-24.08.2/libscience/chemicaldataobject.cpp:7:
/usr/lib/include/qt6/QtCore/qvariant.h:433:10: note: declared here
433 | Type type() const
| ^~~~
/usr/src/kalzium-24.08.2/libscience/chemicaldataobject.cpp: In member function
'bool ChemicalDataObject::operator==(bool) const':
/usr/src/kalzium-24.08.2/libscience/chemicaldataobject.cpp:67:24: warning:
'QVariant::Type QVariant::type() const' is deprecated: Use typeId() or
metaType(). [-Wdeprecated-declarations]
67 | if (d->m_value.type() != QVariant::Bool) {
| ~~~~~~~~~~~~~~~^~
/usr/lib/include/qt6/QtCore/qvariant.h:433:10: note: declared here
433 | Type type() const
| ^~~~
/usr/src/kalzium-24.08.2/libscience/chemicaldataobject.cpp: In member function
'bool ChemicalDataObject::operator==(double) const':
/usr/src/kalzium-24.08.2/libscience/chemicaldataobject.cpp:76:24: warning:
'QVariant::Type QVariant::type() const' is deprecated: Use typeId() or
metaType(). [-Wdeprecated-declarations]
76 | if (d->m_value.type() != QVariant::Double) {
| ~~~~~~~~~~~~~~~^~
/usr/lib/include/qt6/QtCore/qvariant.h:433:10: note: declared here
433 | Type type() const
| ^~~~
/usr/src/kalzium-24.08.2/libscience/chemicaldataobject.cpp: In member function
'bool ChemicalDataObject::operator==(const QString&) const':
/usr/src/kalzium-24.08.2/libscience/chemicaldataobject.cpp:85:24: warning:
'QVariant::Type QVariant::type() const' is deprecated: Use typeId() or
metaType(). [-Wdeprecated-declarations]
85 | if (d->m_value.type() != QVariant::String) {
| ~~~~~~~~~~~~~~~^~
/usr/lib/include/qt6/QtCore/qvariant.h:433:10: note: declared here
433 | Type type() const
| ^~~~
[ 12%] Building CXX object
libscience/CMakeFiles/science.dir/moleculeparser.cpp.o
[ 13%] Building CXX object libscience/CMakeFiles/science.dir/parser.cpp.o
[ 14%] Building CXX object libscience/CMakeFiles/science.dir/psetables.cpp.o
[ 15%] Linking CXX shared library ../bin/libscience.so
[ 16%] Built target science
[ 17%] Generating prefs.h, prefs.cpp
[ 17%] Built target kalzium_autogen_timestamp_deps
[ 17%] Automatic MOC for target kalzium
[ 17%] Built target kalzium_autogen
[ 17%] Generating ui_titrationCalculator.h
[ 18%] Generating chemset.cmi
[ 19%] Generating chemset.cmx
[ 20%] Generating parser.cmi
[ 21%] Generating parser.cmx
[ 22%] Generating lexer.cmx
[ 23%] Generating datastruct.cmi
[ 24%] Generating datastruct.cmx
[ 24%] Generating chem.cmi
[ 24%] Generating chem.cmx
File "/usr/src/kalzium-24.08.2/src/solver/chem.ml", line 40, characters 43-54:
40 | let nb_molecules = eq#getsize_j () and nb_elements = eq#getsize_i ()
in
^^^^^^^^^^^
Warning 26 [unused-var]: unused variable nb_elements.
File "_none_", line 1:
Warning 58 [no-cmx-file]: no cmx file was found in path for module Facile, and
its interface was not compiled with -opaque
[ 25%] Generating calc.cmi
[ 26%] Generating calc.cmx
[ 27%] Automatic RCC for kalzium.qrc
[ 28%] Generating solver.o
[ 29%] Generating modwrap.o
/usr/src/kalzium-24.08.2/src/solver/modwrap.c: In function 'solve_equation':
/usr/src/kalzium-24.08.2/src/solver/modwrap.c:18:32: warning: assignment
discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
18 | solve_equation_closure = caml_named_value("solve_equation");
| ^
[ 30%] Generating ui_calculator.h
[ 31%] Generating ui_concCalculator.h
[ 32%] Generating ui_equationview.h
[ 33%] Generating ui_exportdialog.h
[ 34%] Generating ui_gasCalculator.h
[ 35%] Generating ui_gradientwidget.h
[ 36%] Generating ui_isotopedialog.h
[ 36%] Generating ui_molcalcwidgetbase.h
[ 37%] Generating ui_nuclearCalculator.h
[ 38%] Generating ui_plotsetupwidget.h
[ 39%] Generating ui_rswidget.h
[ 40%] Generating ui_settings_calc.h
[ 40%] Generating ui_settings_colors.h
[ 41%] Generating ui_settings_gradients.h
[ 42%] Generating ui_spectrumview.h
[ 43%] Building CXX object
src/CMakeFiles/kalzium.dir/kalzium_autogen/mocs_compilation.cpp.o
[ 44%] Building CXX object src/CMakeFiles/kalzium.dir/kalzium_debug.cpp.o
[ 44%] Building CXX object
src/CMakeFiles/kalzium.dir/calculator/calculator.cpp.o
[ 45%] Building CXX object
src/CMakeFiles/kalzium.dir/calculator/concCalculator.cpp.o
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp: In member function
'void concCalculator::calculateAmtSolute()':
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:218:62: warning:
'volSolute' may be used uninitialized [-Wmaybe-uninitialized]
218 | m_amtSolute = Value(volSolute, KUnitConversion::Liter);
| ^
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:125:49: note:
'volSolute' was declared here
125 | double molesSolute, eqtsSolute, massSolute, volSolute; // variables
| ^~~~~~~~~
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:239:31: warning:
'molesSolute' may be used uninitialized [-Wmaybe-uninitialized]
239 | ui.amtSolute->setValue(molesSolute);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:125:12: note:
'molesSolute' was declared here
125 | double molesSolute, eqtsSolute, massSolute, volSolute; // variables
| ^~~~~~~~~~~
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:193:62: warning:
'massSolute' may be used uninitialized [-Wmaybe-uninitialized]
193 | m_amtSolute = Value(massSolute, KUnitConversion::Gram);
| ^
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:125:37: note:
'massSolute' was declared here
125 | double molesSolute, eqtsSolute, massSolute, volSolute; // variables
| ^~~~~~~~~~
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp: In member function
'void concCalculator::calculateAmtSolvent()':
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:446:64: warning:
'massSolvent' may be used uninitialized [-Wmaybe-uninitialized]
446 | m_amtSolvent = Value(massSolvent, KUnitConversion::Gram);
| ^
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:358:25: note:
'massSolvent' was declared here
358 | double moleSolvent, massSolvent, volSolvent;
| ^~~~~~~~~~~
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:463:32: warning:
'moleSolvent' may be used uninitialized [-Wmaybe-uninitialized]
463 | ui.amtSolvent->setValue(moleSolvent);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:358:12: note:
'moleSolvent' was declared here
358 | double moleSolvent, massSolvent, volSolvent;
| ^~~~~~~~~~~
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:430:64: warning:
'volSolvent' may be used uninitialized [-Wmaybe-uninitialized]
430 | m_amtSolvent = Value(volSolvent, KUnitConversion::Liter);
| ^
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:358:38: note:
'volSolvent' was declared here
358 | double moleSolvent, massSolvent, volSolvent;
| ^~~~~~~~~~
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp: In member function
'void concCalculator::calculateMolarMass()':
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:276:9: warning:
'numMoles' may be used uninitialized [-Wmaybe-uninitialized]
276 | if (numMoles == 0.0) {
| ^~
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:251:12: note:
'numMoles' was declared here
251 | double numMoles;
| ^~~~~~~~
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp: In member function
'void concCalculator::calculateEqtMass()':
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:312:9: warning:
'numEqts' may be used uninitialized [-Wmaybe-uninitialized]
312 | if (numEqts == 0.0) {
| ^~
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:292:12: note:
'numEqts' was declared here
292 | double numEqts;
| ^~~~~~~
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp: In member function
'void concCalculator::calculateMolarMassSolvent()':
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:345:44: warning:
'numMoles' may be used uninitialized [-Wmaybe-uninitialized]
345 | m_molarMassSolvent = massSolvent() / numMoles;
| ~~~~~~~~~~~~~~^~~~~~~~~~
/usr/src/kalzium-24.08.2/src/calculator/concCalculator.cpp:328:12: note:
'numMoles' was declared here
328 | double numMoles;
| ^~~~~~~~
[ 46%] Building CXX object
src/CMakeFiles/kalzium.dir/calculator/gasCalculator.cpp.o
[ 47%] Building CXX object
src/CMakeFiles/kalzium.dir/calculator/nuclearCalculator.cpp.o
/usr/src/kalzium-24.08.2/src/calculator/nuclearCalculator.cpp: In member
function 'void nuclearCalculator::isotopeChanged(int)':
/usr/src/kalzium-24.08.2/src/calculator/nuclearCalculator.cpp:179:64: error:
'class QString' has no member named 'operator=='; did you mean 'operator='?
179 | int halfLifeUnit = (list.at(index)->halflifeUnit().operator==("y"))
? KUnitConversion::Year : KUnitConversion::Second;
| ^~
|
operator=
make[2]: *** [src/CMakeFiles/kalzium.dir/build.make:320:
src/CMakeFiles/kalzium.dir/calculator/nuclearCalculator.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4188: src/CMakeFiles/kalzium.dir/all] Error
2
make: *** [Makefile:136: all] Error 2
EXPECTED RESULT
successful compile
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Lunar Linux/Plasma 6.2.0
KDE Plasma Version:
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
ADDITIONAL INFORMATION
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Kalzium
mailing list