[Kde-bindings] KDE/kdebindings/csharp/ktexteditor/examples/kwrite
Arno Rehn
kde at arnorehn.de
Sun Jul 27 23:35:07 UTC 2008
SVN commit 838494 by arnorehn:
* Make use of KCmdLineArgs - works for me.
* Fix a small bug in the loop to read from stdin.
CCMAIL: kde-bindings at kde.org
M +1 -5 kwritemain.cs
--- trunk/KDE/kdebindings/csharp/ktexteditor/examples/kwrite/kwritemain.cs #838493:838494
@@ -645,10 +645,6 @@
bool nav = false;
int line = 0, column = 0;
- // The code below that uses KCmdLineArgs doesn't work, so avoid it for now
- KWrite t2 = new KWrite();
- return KApplication.Exec();
-
QTextCodec codec = args.IsSet("encoding") ? QTextCodec.CodecForName(args.GetOption("encoding")) : null;
@@ -678,7 +674,7 @@
do {
inputLine = input.ReadLine();
text += (inputLine + "\n");
- } while(inputLine.Length != 0);
+ } while (inputLine != null);
KTextEditor.Document doc = t.View().Document();
More information about the Kde-bindings
mailing list