Hi,
Often, but not each time, "toStdString" is converting the string into an empty string !! It is completely random and do not know how to solve this problem ?
do you have any idea ?
Thanks
Hi,
Often, but not each time, "toStdString" is converting the string into an empty string !! It is completely random and do not know how to solve this problem ?
do you have any idea ?
Thanks
Did you make sure the input string is not empty in the first place? if so how?
Post your code.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Yes, I'm in the debugger and the debugger show me the content of my string... everything sounds fine !!!
Here is the code... so simple !!!
string file = _currentFilePath.toStdString();
can you show the following several lines too?
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Thanks,
I have this problem since several months !
Here is the complete method :
Qt Code:
void psMainWindow::on_Menu_Save() { if (_currentFilePath.length() < 1) { on_Menu_SaveAs(); return; } UpdatePanelWidget::Start(); pureGraph::IE::Exporter exporter; string file = _currentFilePath.toStdString(); exporter.Export(GlobalContext::Scene, file); UpdatePanelWidget::Stop(); }To copy to clipboard, switch view to plain text mode
and you say that when you stand on line 13 in the debugger, '_currentFilePath' has a valid string in it, and 'file' is an empty string?
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Bookmarks