X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=src%2Fedit%2Feditor.cpp;h=2315c0e1f5d75b9b66b7e4f6bb409ce7622502a9;hb=HEAD;hp=c697a32827bf4261e67f7394a9cc2ce3ca982f09;hpb=b74545f199d4cf52c1b40a3dab7be65b20f68a26;p=vlp.git diff --git a/src/edit/editor.cpp b/src/edit/editor.cpp index c697a32..2315c0e 100644 --- a/src/edit/editor.cpp +++ b/src/edit/editor.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include @@ -36,6 +35,7 @@ Editor::Editor(int argc, char **argv) if (argc > 1) { strcpy(HomeDir, argv[1]); + fprintf(stderr, "EDIT: HomeDir inited with: %s (%s)\n", HomeDir, argv[1]); } find_text = ""; @@ -88,9 +88,10 @@ void Editor::load(const char *fileName) editor->clear(); QTextStream textStream(&file); - while (!file.atEnd()) { - editor->append(textStream.readLine()); - } + editor->append(textStream.readAll()); +// while (!file.atEnd()) { +// editor->append(textStream.readLine()); +// } file.close(); @@ -174,7 +175,8 @@ void Editor::compile(int mode) void Editor::on_actionNew_triggered() { on_actionClear_all_triggered(); - fname.sprintf("%s", "");} + fname.sprintf("%s", ""); +} /** * Displays additional window