From 6d86b51b1030208d99649829cea96de0b64b5ed7 Mon Sep 17 00:00:00 2001 From: Noldor Date: Wed, 2 Sep 2009 15:56:45 +0000 Subject: Some fix in code and doc + removed obsolete code git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@3466 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/objects/class_file.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src/modules/objects/class_file.cpp') diff --git a/src/modules/objects/class_file.cpp b/src/modules/objects/class_file.cpp index b1b383f5c..dc3c6ea49 100644 --- a/src/modules/objects/class_file.cpp +++ b/src/modules/objects/class_file.cpp @@ -1,11 +1,11 @@ //============================================================================= // -// File : class_memorybuffer.cpp +// File : class_file.cpp // Creation date : Fri Mar 18 21:30:48 CEST 2005 // by Tonino Imbesi(Grifisx) and Alessandro Carbone(Noldor) // // This file is part of the KVirc irc client distribution -// Copyright (C) 2005-2008 Alessandro Carbone (elfonol at gmail dot com) +// Copyright (C) 2000-2009 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -235,23 +235,24 @@ KVSO_CLASS_FUNCTION(file,open) { for ( int idx=0;idxwarning(__tr2qs_ctx("No such open mode '%Q'","objects"),&modes.at(idx)); } } - - m_pFile->open(QIODevice::ReadOnly); + c->returnValue()->setBoolean(m_pFile->open(sum)); return true; } @@ -533,8 +534,9 @@ KVSO_CLASS_FUNCTION(file,readLine) CHECK_INTERNAL_POINTER(m_pFile) CHECK_FILE_IS_OPEN QString buffer; - bool ok=KviFileUtils::readLine(m_pFile,buffer); - debug("ok %d",ok); + //bool ok=KviFileUtils::readLine(m_pFile,buffer); + buffer=m_pFile->readLine(); + // debug("ok %d",ok); c->returnValue()->setString(buffer); return true; } -- cgit v1.3.1-10-gc9f91