Bug 351609

Summary: startupconfig/startupconfigfiles corruption in Qt 5.6
Product: [Plasma] kde-cli-tools Reporter: Takahiro Hashimoto <kenya888>
Component: generalAssignee: Aleix Pol <aleixpol>
Status: RESOLVED FIXED    
Severity: normal CC: simonandric5
Priority: NOR    
Version: 5.4.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: corrupted startupconfig file
corrupted startupconfigfile file

Description Takahiro Hashimoto 2015-08-22 10:58:06 UTC
Building Plasma5 with Qt 5.6 branch, kstartupconfig5/kdostartupconfig5 generates corrupted files.

$HOME/.config/startupconfigfiles
$HOME/.config/startupconfig

Reproducible: Always

Steps to Reproduce:
1. Build KF5 with Qt5.6 latest branch
2. exec k(do)startupconfig
3. view your startupconfig files 

Actual Results:  
These files are corrupted (attached)

Expected Results:  
Generate these files correctly

The  root cause of  this  the change of QString::fromLocal8Bit(const QByteArray & str) behavior on Qt 5.6 branch by the following commit.

https://codereview.qt-project.org/#/c/96845/
Comment 1 Takahiro Hashimoto 2015-08-22 10:59:04 UTC
Created attachment 94165 [details]
corrupted startupconfig file
Comment 2 Takahiro Hashimoto 2015-08-22 10:59:39 UTC
Created attachment 94166 [details]
corrupted startupconfigfile file
Comment 3 Takahiro Hashimoto 2015-08-22 11:08:19 UTC
I introduced the patch which fixes this issue.

https://git.reviewboard.kde.org/r/124877/
Comment 4 Takahiro Hashimoto 2015-09-14 12:39:04 UTC
Git commit e92628aa42251cad211733d88affbf6a56277379 by Takahiro Hashimoto.
Committed on 14/09/2015 at 12:35.
Pushed by hashimoto into branch 'master'.

fix corruption of startupconfig(files) in Qt5.6
REVIEW: 124877

M  +2    -9    startkde/kstartupconfig/kdostartupconfig.cpp

http://commits.kde.org/plasma-workspace/e92628aa42251cad211733d88affbf6a56277379