{"action":"closed","issue":{"url":"https://api.github.com/repos/tucnak/novile/issues/5","labels_url":"https://api.github.com/repos/tucnak/novile/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/tucnak/novile/issues/5/comments","events_url":"https://api.github.com/repos/tucnak/novile/issues/5/events","html_url":"https://github.com/tucnak/novile/issues/5","id":128912846,"number":5,"title":"Problem setting text on Windows","user":{"login":"danarmstrong","id":4072243,"avatar_url":"https://avatars.githubusercontent.com/u/4072243?v=3","gravatar_id":"","url":"https://api.github.com/users/danarmstrong","html_url":"https://github.com/danarmstrong","followers_url":"https://api.github.com/users/danarmstrong/followers","following_url":"https://api.github.com/users/danarmstrong/following{/other_user}","gists_url":"https://api.github.com/users/danarmstrong/gists{/gist_id}","starred_url":"https://api.github.com/users/danarmstrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danarmstrong/subscriptions","organizations_url":"https://api.github.com/users/danarmstrong/orgs","repos_url":"https://api.github.com/users/danarmstrong/repos","events_url":"https://api.github.com/users/danarmstrong/events{/privacy}","received_events_url":"https://api.github.com/users/danarmstrong/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-26T19:05:28Z","updated_at":"2016-01-27T17:46:28Z","closed_at":"2016-01-27T17:46:28Z","body":"When I attempt to set the text of the editor from the contents of a file on Windows like so:\r\n\r\n```\r\nvoid CodeEditor::loadFile(const QString &path) {\r\n\r\n    mFile = new QFile(path);\r\n    if (!mFile->open(QIODevice::ReadOnly)) {\r\n        qWarning() << \"Unable to open file: \" << path;\r\n        return;\r\n    }\r\n\r\n    mEditor->setText(mFile->readAll());\r\n    mEditor->setCursorPosition(0, 0);\r\n    mFile->close();\r\n}\r\n```\r\n\r\nthe value of mEditor->text() is always \"\"\r\n\r\nThis code does work, however, on OS X.\r\n\r\nThe following does work.\r\n```\r\nmEditor->setText(\"some text\");\r\n```\r\n\r\nI also tried this and, again, text comes up empty.\r\n```\r\nQString contents = file.readAll();\r\nmEditor->setText(contents);\r\n```\r\n\r\nAnd since I'm sure you will ask, yes, I have dumped the contents of the file using qDebug and the file is being read correctly.\r\n\r\nI'm not sure if I'm doing something wrong but I find it odd (not really) that this is only happening on Windows. Any assistance would be greatly appreciated."}}