Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
Qt Creator 3.2.0, Qt Creator 4.4.0-rc1
-
None
Description
If we have some long strings they may not be able to be displayed in the debug window. That is ok, but it is an unpleasant suprise that the value cannot be copied into the clipboard without being elided (truncated).
For example:
void doSomething() { } int main(int argc, char *argv[]) { QString someSql = "select column1, column2, column3, column4, column5 from someOwner.someTable " " where aQuiteLongTextCol1a = :aNotsThatShortTextVar1a " " and aQuiteLongTextCol2a = :aNotsThatShortTextVar2a " " and aQuiteLongTextCol3a = :aNotsThatShortTextVar3a " " and aQuiteLongTextCol4a = :aNotsThatShortTextVar4a " " and aQuiteLongTextCol5a = :aNotsThatShortTextVar5a " " and aQuiteLongTextCol6a = :aNotsThatShortTextVar6a " " and aQuiteLongTextCol7a = :aNotsThatShortTextVar7a " " and aQuiteLongTextCol8a = :aNotsThatShortTextVar8a " " and aQuiteLongTextCol9a = :aNotsThatShortTextVAr9a "; doSomething(); // <- right click variable + copy value to clip board }
The clipboard only contains:
"select column1, column2, column3, column4, column5 from someOwner.someTable where aQuiteLongTextCol1a = :aNotsThatShortTextVar1a and aQuiteLongTextCol2a = :aNotsThatShortTextVar2a and aQuiteLongTextCol3a = :aNotsThatShortTextVar3a and aQuiteLongTextCol4a = :aNotsThatShortTextVar4a and aQuiteLongTextCol5a = :aNotsThatShortTextVar5a and aQuiteLongTextCol6a = :aNotsThatShortTextVar6a and aQuiteLongTextCol7a = :aNotsThatShortTextVar7a and aQuiteLongTextCol8a = :aNotsThatShortTextVar8a and aQuiteLongTe..."
It is elided and truncated.
I expect to be able to paste the whole (!) string value into an editor.
In https://qt.gitorious.org/qt-creator/krishnaas-qt-creator/commit/55b4e6d I suspect that the following code makes the code goes wrong:
// Truncate value for item view, maintaining quotes static inline QString truncateValue(QString v) { enum { maxLength = 512 }; if (v.size() < maxLength) }
It seems like we copy a truncated value - rather than doing a re-evaluate. The truncate is also a 512 constant and has nothing to do with the string settings under tool->options->debugger.
Attachments
Issue Links
- is duplicated by
-
QTCREATORBUG-21817 Debugger Locals View clipboard strings truncated to ~100 characters
- Closed
-
QTCREATORBUG-21911 debugger displays truncated strings
- Closed
-
QTCREATORBUG-23840 "Copy current value to clipboard" from Locals string breaks off contents
- Closed
-
QTCREATORBUG-12915 Copy to Clipboard is not working like intended
- Closed
- relates to
-
QTCREATORBUG-8935 Separate Debugger Window stays open
- Open
-
QTCREATORBUG-10803 Can't view / copy full content of QString in debugger
- Closed
-
QTCREATORBUG-23671 String in Locals view is elided although more space is available
- Closed
-
QTCREATORBUG-1605 copy whole value of a long QString variable to clipboard
- Closed