Error placeholdertext is not a member of qpalette

Can't build from nightly kstars/ekos bits due to following error: [ 13%] Building CXX object kstars/CMakeFiles/KStarsLib.dir/ekos/manager.cpp.o In file included from...

×

INDI Library v2.0.0 Released

(01 Feb 2023)

Bi-monthly release with major changes to INDI properties and client API in addition to new drivers and improvements.

kstars/ekos build fails on ekos/manager.cpp was created by fmozza

Can’t build from nightly kstars/ekos bits due to following error:

[ 13%] Building CXX object kstars/CMakeFiles/KStarsLib.dir/ekos/manager.cpp.o
In file included from /home/jmh/Devel/kstars/kstars/ekos/scheduler/scheduler.h:14:0,
from /home/jmh/Devel/kstars/kstars/ekos/manager.h:30,
from /home/jmh/Devel/kstars/kstars/ekos/manager.cpp:10:
/home/jmh/Devel/build-kstars/kstars/kstars/ui_scheduler.h: In member function ‘void Ui_Scheduler::setupUi(QWidget*)’:
/home/jmh/Devel/build-kstars/kstars/kstars/ui_scheduler.h:432:54: error: ‘PlaceholderText’ is not a member of ‘QPalette’
palette.setBrush(QPalette::Active, QPalette::PlaceholderText, brush1);
^~~~~~~~~~~~~~~
/home/jmh/Devel/build-kstars/kstars/kstars/ui_scheduler.h:438:56: error: ‘PlaceholderText’ is not a member of ‘QPalette’
palette.setBrush(QPalette::Inactive, QPalette::PlaceholderText, brush2);
^~~~~~~~~~~~~~~
/home/jmh/Devel/build-kstars/kstars/kstars/ui_scheduler.h:448:56: error: ‘PlaceholderText’ is not a member of ‘QPalette’
palette.setBrush(QPalette::Disabled, QPalette::PlaceholderText, brush5);
^~~~~~~~~~~~~~~
kstars/CMakeFiles/KStarsLib.dir/build.make:1575: recipe for target ‘kstars/CMakeFiles/KStarsLib.dir/ekos/manager.cpp.o’ failed
make[2]: *** [kstars/CMakeFiles/KStarsLib.dir/ekos/manager.cpp.o] Error 1
CMakeFiles/Makefile2:432: recipe for target ‘kstars/CMakeFiles/KStarsLib.dir/all’ failed
make[1]: *** [kstars/CMakeFiles/KStarsLib.dir/all] Error 2
Makefile:140: recipe for target ‘all’ failed
make: *** [all] Error 2

I also can’t see a way to add the bug to github, so I’m doing it here.

Regards,

jmh



3 years 4 months ago


#43657

Please Log in or Create an account to join the conversation.

Replied by Picard on topic kstars/ekos build fails on ekos/manager.cpp

i have the same issue :

[ 6%] Building CXX object kstars/CMakeFiles/KStarsLib.dir/ekos/opsekos.cpp.o
In file included from /home/christian/Projects/kstars/kstars/ekos/scheduler/scheduler.h:14:0,
from /home/christian/Projects/kstars/kstars/ekos/manager.h:30,
from /home/christian/Projects/kstars/kstars/ekos/manager.cpp:10:
/home/christian/Projects/kstars/build/kstars/ui_scheduler.h: In member function ‘void Ui_Scheduler::setupUi(QWidget*)’:
/home/christian/Projects/kstars/build/kstars/ui_scheduler.h:432:54: error: ‘PlaceholderText’ is not a member of ‘QPalette’
palette.setBrush(QPalette::Active, QPalette::PlaceholderText, brush1);
^~~~~~~~~~~~~~~
/home/christian/Projects/kstars/build/kstars/ui_scheduler.h:438:56: error: ‘PlaceholderText’ is not a member of ‘QPalette’
palette.setBrush(QPalette::Inactive, QPalette::PlaceholderText, brush2);
^~~~~~~~~~~~~~~
/home/christian/Projects/kstars/build/kstars/ui_scheduler.h:448:56: error: ‘PlaceholderText’ is not a member of ‘QPalette’
palette.setBrush(QPalette::Disabled, QPalette::PlaceholderText, brush5);
^~~~~~~~~~~~~~~
In file included from /home/christian/Projects/kstars/kstars/ekos/scheduler/scheduler.h:14:0,
from /home/christian/Projects/kstars/kstars/ekos/manager.h:30,
from /home/christian/Projects/kstars/kstars/ekos/opsekos.cpp:13:
/home/christian/Projects/kstars/build/kstars/ui_scheduler.h: In member function ‘void Ui_Scheduler::setupUi(QWidget*)’:
/home/christian/Projects/kstars/build/kstars/ui_scheduler.h:432:54: error: ‘PlaceholderText’ is not a member of ‘QPalette’
palette.setBrush(QPalette::Active, QPalette::PlaceholderText, brush1);
^~~~~~~~~~~~~~~
/home/christian/Projects/kstars/build/kstars/ui_scheduler.h:438:56: error: ‘PlaceholderText’ is not a member of ‘QPalette’
palette.setBrush(QPalette::Inactive, QPalette::PlaceholderText, brush2);
^~~~~~~~~~~~~~~
/home/christian/Projects/kstars/build/kstars/ui_scheduler.h:448:56: error: ‘PlaceholderText’ is not a member of ‘QPalette’
palette.setBrush(QPalette::Disabled, QPalette::PlaceholderText, brush5);
^~~~~~~~~~~~~~~
kstars/CMakeFiles/KStarsLib.dir/build.make:1671: recipe for target ‘kstars/CMakeFiles/KStarsLib.dir/ekos/opsekos.cpp.o’ failed
make[2]: *** [kstars/CMakeFiles/KStarsLib.dir/ekos/opsekos.cpp.o] Error 1
make[2]: *** Attente des tâches non terminées….
kstars/CMakeFiles/KStarsLib.dir/build.make:1575: recipe for target ‘kstars/CMakeFiles/KStarsLib.dir/ekos/manager.cpp.o’ failed
make[2]: *** [kstars/CMakeFiles/KStarsLib.dir/ekos/manager.cpp.o] Error 1
CMakeFiles/Makefile2:432: recipe for target ‘kstars/CMakeFiles/KStarsLib.dir/all’ failed
make[1]: *** [kstars/CMakeFiles/KStarsLib.dir/all] Error 2
Makefile:140: recipe for target ‘all’ failed
make: *** [all] Error 2

C8 lightbridge, Orion Atlas mount, EOS 1000D modified and ASI120MM for guiding.



3 years 4 months ago


#43660

Please Log in or Create an account to join the conversation.


  • Forum

  • INDI Library

  • Clients

  • Ekos

  • kstars/ekos build fails on ekos/manager.cpp

Time to create page: 0.599 seconds

Ale753

Posts: 1
Joined: Tue Oct 27, 2020 1:47 pm

AttributeError: type object ‘QPalette’ has no attribute ‘placeholderText’

Hello,
I developed a simple Qt application with graphical user-interface in python(python 3.8.6). I using the following Qt version
Qt creator 4.13.2
based on QT 5.15.1 (MSVC 2019, 64bit)
built on Oct 1 2020 01:14:56
Now I want to run my application on raspberry pi 3 model B with the Raspberry Pi OS (32-bit) Relased: 2020-08-20.
I installed on Raspberry board python 3.7.3 using the command:
sudo apt install python3 idle3
and the pyqt5 using the command:
sudo apt-get install python3-pyqt5
I also updated the all the pakages.
Then I tried to run the project with Thonny 3.2.6 Linux Python 3.7.3(32 bit) Tk 8.6.9
But I obtained the following error :
AttributeError: type object ‘QPalette’ has no attribute ‘placeholderText’
This error raised from the following python instruction :
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.PlaceholderText, brush)

How I can fix this?
Thanks in advance for any replies.


User avatar

Paeryn

Posts: 3531
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: AttributeError: type object ‘QPalette’ has no attribute ‘placeholderText’

Tue Oct 27, 2020 8:35 pm

According to apt the version of python3-qt5 is 5.11 and according to qt‘s docs the attribute PlaceholderText wasn’t introduced until 5.12, so you’ll either have to re-write your program using only features available in 5.11 or build qt5 and dependant libraries yourself using the latest source code. The former is probably going to be the easier route to take unless you absolutely have to have the newer features.

Quote from qt5 docs on the function QPalette.placehoderText()

Note: Before Qt 5.12, the placeholder text color was hard-coded in the code as QPalette::text().color() where an alpha of 128 was applied. We continue to support this behavior by default, unless you set your own brush. One can get back the original placeholder color setting the special QBrush default constructor as placeholder brush.

This function was introduced in Qt 5.12.

She who travels light — forgot something.
Please note that my name doesn’t start with the @ character so can people please stop writing it as if it does!


Return to “Python”

View unanswered posts | View active topics

View unread posts | View new posts | View your posts

Author Message

Offline

Post subject: Re: q5Go-0.7: Database support

Post #21 Posted: Sun Mar 24, 2019 2:00 am 

Dies in gote



Posts: 23
Liked others: 4
Was liked: 3

DGS: embee

I think this is useful if there is an option to enable this.
Same information as Lizzie.

Top

Profile  

Offline

bernds

Post subject: Re: q5Go-0.7: Database support

Post #22 Posted: Mon Mar 25, 2019 8:03 am 



Posts: 259
Liked others: 45
Was liked: 116

Rank: 2d

Ok, I’ve added something like this. Here’s some sample output after leting two engines analyze a game:

Code:

Analysis: Leela Zero 199-15×192 analysis @7.5 komi
Engine top choice: D5, 549 visits, winrate B: 47.14%
Game move: D6, choice #2, winrate B: 0.5495% (+7.81)
—————-
Analysis: LZ Elf-V2 analysis @7.5 komi
Engine top choice: D5, 610 visits, winrate B: 53.2%
Game move: D6, not considered, winrate B: 0.7507% (+21.87)

If you’re able to build it yourself, the code is now on github. But it’s getting to the point where there is enough new stuff (the major bits this time being multi-engine analysis, slide export) to make a release, so that should happen some time this week after I’ve tested it a bit more.

Top

Profile  

Offline

mb76

Post subject: Re: q5Go-0.7: Database support

Post #23 Posted: Mon Mar 25, 2019 1:30 pm 



Posts: 23
Liked others: 4
Was liked: 3

DGS: embee

I personally would like a different order:
Engine top choice: D5, 549 visits, winrate B: 47.14%
Game move: D6, choice #2, winrate B: 0.5495% (+7.81)
Analysis: Leela Zero 199-15×192 analysis @7.5 komi

The reason is I open these analyzed files on a mobile phone so I think the most important information should be on top (I don’t want to nitpick). Like the extra choice# info.
Does it overwrite current comments? I wait for the compiled version!

Top

Profile  

Offline

bernds

Post subject: Re: q5Go-0.8: Multi-engine analysis and slide export

Post #24 Posted: Thu Mar 28, 2019 6:10 am 



Posts: 259
Liked others: 45
Was liked: 116

Rank: 2d

Release 0.8 is now out — it includes two major new features, slide export (useful for slide shows or videos), and multi-engine analysis. Also, with engines like LZ, batch analysis can now produce reverse-komi evaluations by internally flipping the colors.
As usual, see the first post for more information.

Top

Profile  

Offline

mb76

Post subject: Re: q5Go-0.8: Multi-engine analysis and slide export

Post #25 Posted: Sat Mar 30, 2019 6:32 am 



Posts: 23
Liked others: 4
Was liked: 3

DGS: embee

I tested the Batch computer analysis mode V.08:
A) In which folder are the configuration files stored for the Engines? Because a new or deleted configuration file only (dis)appears when I restart Q5.
B1) The analysis function works fine with Leela 0.16. Including the Add evaluation info!
B2) But with Leela 0.17 beta (LZ_0.17-next-x64-28032019) it gets stuck in a loop at the first move (so it stays at 0%). See attachment for the log file.
C) It is not clear to me what the «If fixed engine komi» does or how it should be set-up. It needs a read me/help?

Top

Profile  

Offline

bernds

Post subject: Re: q5Go-0.8: Multi-engine analysis and slide export

Post #26 Posted: Sat Mar 30, 2019 2:50 pm 



Posts: 259
Liked others: 45
Was liked: 116

Rank: 2d

mb76 wrote:

I tested the Batch computer analysis mode V.08:
A) In which folder are the configuration files stored for the Engines? Because a new or deleted configuration file only (dis)appears when I restart Q5.

Which OS are you on? On Windows, the config file is in (I think) %APPDATA%/Local/q5go/, on Linux it should be ~/.config/q5go/.
I’m not sure what situation or actions you are describing. What exactly are you doing and what is the behaviour?

Quote:

B1) The analysis function works fine with Leela 0.16. Including the Add evaluation info!
B2) But with Leela 0.17 beta (LZ_0.17-next-x64-28032019) it gets stuck in a loop at the first move (so it stays at 0%). See attachment for the log file.

Hmm, I just tried with a build from the next branch on Linux, and it seems to work fine here. I’ll try on Windows the next time I boot into it.

Quote:

C) It is not clear to me what the «If fixed engine komi» does or how it should be set-up. It needs a read me/help?

This is the reverse komi support. LZ only supports a fixed komi of 7.5, and you should put that in the configuration. The combo box then selects the behaviour — keep the 7.5 komi always, or switch to -7.5 if the analyzed game has reverse komi, or just analyze both.
That definitely ought to have a tooltip, which appears to be missing. I’ll fix that.

Top

Profile  

Offline

bernds

Post subject: Re: q5Go-0.8: Multi-engine analysis and slide export

Post #27 Posted: Thu Apr 04, 2019 9:38 am 



Posts: 259
Liked others: 45
Was liked: 116

Rank: 2d

mb76 wrote:

B2) But with Leela 0.17 beta (LZ_0.17-next-x64-28032019) it gets stuck in a loop at the first move (so it stays at 0%). See attachment for the log file.

This should be fixed now with version 0.8.1.

Top

Profile  

Offline

bernds

Post subject: Re: q5Go-0.8.1: LZ 0.17 compatibility update + Mac binaries!

Post #28 Posted: Wed Apr 10, 2019 8:19 am 



Posts: 259
Liked others: 45
Was liked: 116

Rank: 2d

Many thanks to Adrian Petrescu, who has built the latest release on the Mac and provided a Mac binary package on his Github page.

Top

Profile  

Offline

Bill Spight

Post subject: Re: q5Go-0.8.1: LZ 0.17 compatibility update + Mac binaries!

Post #29 Posted: Tue Apr 30, 2019 10:17 am 



Posts: 10905
Liked others: 3651
Was liked: 3373

bernds wrote:

Many thanks to Adrian Petrescu, who has built the latest release on the Mac and provided a Mac binary package on his Github page.

I downloaded the binary, but when I unzipped it and tried to run it, after giving permission, I got the dreaded OSStatus=99999 error message. I have a MacBook pro with Mojave 10.14.4 and NVIDIA GeForce GT 750M 2GB. :(

_________________
The Adkins Principle:
At some point, doesn’t thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.

Top

Profile  

Offline

bernds

Post subject: Re: q5Go-0.8.1: LZ 0.17 compatibility update + Mac binaries!

Post #30 Posted: Tue Apr 30, 2019 10:58 am 



Posts: 259
Liked others: 45
Was liked: 116

Rank: 2d

Bill Spight wrote:

bernds wrote:

Many thanks to Adrian Petrescu, who has built the latest release on the Mac and provided a Mac binary package on his Github page.

I downloaded the binary, but when I unzipped it and tried to run it, after giving permission, I got the dreaded OSStatus=99999 error message. I have a MacBook pro with Mojave 10.14.4 and NVIDIA GeForce GT 750M 2GB. :(

Unfortunately it’s not something I can help with — I’ve never owned a Mac. There are a few Google results, several of them suggesting a similar solution, but I can’t tell whether those are safe to use.

Top

Profile  

Offline

Bill Spight

Post subject: Re: q5Go-0.8.1: LZ 0.17 compatibility update + Mac binaries!

Post #31 Posted: Tue Apr 30, 2019 11:34 am 



Posts: 10905
Liked others: 3651
Was liked: 3373

bernds wrote:

Bill Spight wrote:

bernds wrote:

Many thanks to Adrian Petrescu, who has built the latest release on the Mac and provided a Mac binary package on his Github page.

I downloaded the binary, but when I unzipped it and tried to run it, after giving permission, I got the dreaded OSStatus=99999 error message. I have a MacBook pro with Mojave 10.14.4 and NVIDIA GeForce GT 750M 2GB. :(

Unfortunately it’s not something I can help with — I’ve never owned a Mac. There are a few Google results, several of them suggesting a similar solution, but I can’t tell whether those are safe to use.

Thanks, I did a search last night and nothing seemed to work better than using an earlier MacOS, or waiting for another update.

_________________
The Adkins Principle:
At some point, doesn’t thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.

Top

Profile  

Offline

mirage

Post subject: Re: q5Go-0.8.1: LZ 0.17 compatibility update + Mac binaries!

Post #32 Posted: Thu May 09, 2019 5:19 am 



Posts: 1
Liked others: 0
Was liked: 0

Rank: 30 kyu

Hi!

When I tried to run q5Go in Windows 10 32bit, an alert box appear with the message: «Access Denied!»

Do you know why this error appear?

Thanks!

Top

Profile  

Offline

bernds

Post subject: Re: q5Go-0.8.1: LZ 0.17 compatibility update + Mac binaries!

Post #33 Posted: Mon May 13, 2019 5:19 pm 



Posts: 259
Liked others: 45
Was liked: 116

Rank: 2d

mirage wrote:

Hi!

When I tried to run q5Go in Windows 10 32bit, an alert box appear with the message: «Access Denied!»

Do you know why this error appear?

Thanks!

It’s compiled for 64 bit, so I wouldn’t expect this to work. I’m surprised to hear there even is a 32 bit Windows 10 version.

Top

Profile  

Offline

bernds

Post subject: Re: q5Go-0.9: KataGo support, new variants, more AI game opt

Post #34 Posted: Thu Jul 18, 2019 7:57 am 



Posts: 259
Liked others: 45
Was liked: 116

Rank: 2d

I’ve made a new 0.9 release and updated the first two posts. The major new feature is support for KataGo and its score report in analysis mode. But there is also support for additional variants (removing intersections from the board), IGS bug fixes, AI self-play and a few other new things.

Top

Profile  

Offline

mb76

Post subject: Re: q5Go-0.9: KataGo support, new variants, more AI game opt

Post #35 Posted: Thu Jul 18, 2019 1:46 pm 



Posts: 23
Liked others: 4
Was liked: 3

DGS: embee

A)
I would like to see a option to only analyze the first x number of moves. For example only analyse move 0-31 for Batch computer analysis.

B1)
I tried the computer vs. computer function. q5Go-0.9 stops play after the second move.
I would like to send a log file but there is no console (show messages option).
According to GPU-Z (and the coil whine :) ) the engine is still running in the background after the second move.
See attachment.
B2)
The noponder function is not enabled? Or do I have add this myself in the Arguments?

Thx for the update :tmbup:.

Attachments:


180719.zip [348.51 KiB]

Downloaded 417 times

Top

Profile  

Offline

bernds

Post subject: Re: q5Go-0.9: KataGo support, new variants, more AI game opt

Post #36 Posted: Thu Jul 18, 2019 2:18 pm 



Posts: 259
Liked others: 45
Was liked: 116

Rank: 2d

mb76 wrote:

A)
I would like to see a option to only analyze the first x number of moves. For example only analyse move 0-31 for Batch computer analysis.

That sounds doable. I’ll look into it.

Quote:

B1)
I tried the computer vs. computer function. q5Go-0.9 stops play after the second move.
I would like to send a log file but there is no console (show messages option).
According to GPU-Z (and the coil whine :) ) the engine is still running in the background after the second move.
See attachment.

Which engines were you trying to use? I’ll admit I only tested this feature on Linux, not Windows. Does normal play against the engine work for you?
You can create a debug log by passing ‘-D logfilename» as an argument to the program. That might not include the necessary information, however. Maybe your engine can also create a log file? I’m pretty sure KataGo does.

Quote:

B2)
The noponder function is not enabled? Or do I have add this myself in the Arguments?

That’s up to you to configure in the engine set up; q5go can’t really know what the engines want as arguments.

Top

Profile  

Offline

macelee

Post subject: Re: q5Go-0.9: KataGo support, new variants, more AI game opt

Post #37 Posted: Fri Jul 19, 2019 12:07 am 



Posts: 921
Location: UK
Liked others: 72
Was liked: 479

Rank: 5 dan

KGS: macelee

What is this?

In file included from ../src/preferences.cpp:16:
temp_/ui_preferences_gui.h: In member function ‘void Ui_PreferencesDialogGui::setupUi(QDialog*)’:
temp_/ui_preferences_gui.h:2357:54: error: ‘PlaceholderText’ is not a member of ‘QPalette’
palette.setBrush(QPalette::Active, QPalette::PlaceholderText, brush8);
^~~~~~~~~~~~~~~
temp_/ui_preferences_gui.h:2376:56: error: ‘PlaceholderText’ is not a member of ‘QPalette’
palette.setBrush(QPalette::Inactive, QPalette::PlaceholderText, brush9);
^~~~~~~~~~~~~~~
temp_/ui_preferences_gui.h:2399:56: error: ‘PlaceholderText’ is not a member of ‘QPalette’
palette.setBrush(QPalette::Disabled, QPalette::PlaceholderText, brush12);
^~~~~~~~~~~~~~~
make: *** [Makefile:2209: temp_/preferences.o] Error 1

Top

Profile  

Offline

bernds

Post subject: Re: q5Go-0.9: KataGo support, new variants, more AI game opt

Post #38 Posted: Fri Jul 19, 2019 3:40 am 



Posts: 259
Liked others: 45
Was liked: 116

Rank: 2d

macelee wrote:

What is this?

In file included from ../src/preferences.cpp:16:
temp_/ui_preferences_gui.h: In member function ‘void Ui_PreferencesDialogGui::setupUi(QDialog*)’:
temp_/ui_preferences_gui.h:2357:54: error: ‘PlaceholderText’ is not a member of ‘QPalette’
palette.setBrush(QPalette::Active, QPalette::PlaceholderText, brush8);
^~~~~~~~~~~~~~~
temp_/ui_preferences_gui.h:2376:56: error: ‘PlaceholderText’ is not a member of ‘QPalette’
palette.setBrush(QPalette::Inactive, QPalette::PlaceholderText, brush9);
^~~~~~~~~~~~~~~
temp_/ui_preferences_gui.h:2399:56: error: ‘PlaceholderText’ is not a member of ‘QPalette’
palette.setBrush(QPalette::Disabled, QPalette::PlaceholderText, brush12);
^~~~~~~~~~~~~~~
make: *** [Makefile:2209: temp_/preferences.o] Error 1

I think I’ve seen this before and it seems to be some weird incompatibility between Qt versions. Some versions of Designer seem to add these things to .ui files and then it fails to compile on other versions. Looks like some instances crept in in commit cf309e41, they are quite easy to spot and those parts can safely be undone. If you don’t want to try doing that yourself, I’ll push out a fix as soon as possible (currently battling a dying hard disk).

Top

Profile  

Offline

macelee

Post subject: Re: q5Go-0.9: KataGo support, new variants, more AI game opt

Post #39 Posted: Fri Jul 19, 2019 5:18 am 



Posts: 921
Location: UK
Liked others: 72
Was liked: 479

Rank: 5 dan

KGS: macelee

Thanks for you info. I will wait for your next release. Not a big deal as I can use a previous version.

Top

Profile  

Offline

bernds

Post subject: Re: q5Go-0.9: KataGo support, new variants, more AI game opt

Post #40 Posted: Fri Jul 19, 2019 11:57 am 



Posts: 259
Liked others: 45
Was liked: 116

Rank: 2d

macelee wrote:

Thanks for you info. I will wait for your next release. Not a big deal as I can use a previous version.

The master branch now has the update. As of now it’s at the top, with no functional changes beyond 0.9. If you want the exact commit, it’s 2fe4a0d.

Top

Profile  

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Понравилась статья? Поделить с друзьями:
  • Error pathspec first commit did not match any file s known to git
  • Error patch failed
  • Error pasting and does not give a valid preprocessing token
  • Error passphrase chosen is below the length requirements of the usm min 8
  • Error passing const as this argument discards qualifiers