QString enhancement request
Posted: Tue Mar 30 2021 7:01 pm
Can this get fixed?
When porting a lot of code that interfaced to C stuff and was originally written in Qt, having to go back and wrap everything like this
gets really annoying. Can't the class have a constructor that accepts const char *cStr and does the QByteArray under the hood?
Code: Select all
/home/roland/sf_projects/roland_hughes-scintilla/copperspice/ScintillaEditBase/PlatCS.cpp: In member function ‘virtual void* Scintilla::DynamicLibraryImpl::FindFunction(const char*)’:
/home/roland/sf_projects/roland_hughes-scintilla/copperspice/ScintillaEditBase/PlatCS.cpp:1365:46: error: call of overloaded ‘QString8(const char*&)’ is ambiguous
1365 | fp = lib->resolve( QString( name ) );
Function FindFunction( const char *name ) override
/home/roland/sf_projects/roland_hughes-scintilla/copperspice/ScintillaEditBase/ScintillaCS.cpp:815:25: error: call of overloaded ‘QString8(const char*&)’ is ambiguous
815 | QString text( label );
| ^
Code: Select all
QString text( QByteArray( label ) );