~ubuntu-branches/ubuntu/trusty/kvirc/trusty

« back to all changes in this revision

Viewing changes to src/modules/objects/KvsObject_file.cpp

  • Committer: Package Import Robot
  • Author(s): Kai Wasserbäch
  • Date: 2011-09-29 16:27:07 UTC
  • mfrom: (0.3.15 upstream)
  • Revision ID: package-import@ubuntu.com-20110929162707-t29s6itjnsg2syuf
Tags: 4:4.1.3+20110929.svn5980-1
The "Balance of Power" release.

* Synced to upstream's SVN revision 5980.
* debian/control:
  - Vcs-* fields updated.
  - Remove libcrypto++-dev from B-Ds, was dropped upstream.
  - Bumped B-D on debhelper to >= 8.9.4.
* debian/rules:
  - Remove a now obsolete flag.
  - Upstream fixed a typo in a configuration variable name (now
    WANT_COEXISTENCE), updated invocation.
* debian/compat: Now at 9.
* Make KVIrc multiarch ready:
  - debian/{kvirc,libkvilib4,kvirc-modules}.install: Split out binaries
    under /usr/lib.
  - debian/rules: Add -DLIB_SUFFIX to dh_auto_configure invocation.
  - debian/control:
    + Added new packages (needed for split).
    + Added Multi-Arch fields
    + Added Pre-Depends: multiarch-support and ${misc:Pre-Depends} where
      needed.
    + Bumped B-D on CMake.
  - debian/{kvirc,libkvilib4,kvirc-modules}.lintian-overrides: Moved and
    updated overrides to match new locations (one could be dropped in the
    process).

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
                Attempts to open the file in specified mode or modes "sum".
91
91
                Valid modes are:[br]
92
92
                [pre]
93
 
                Raw          - raw, non-buffered access[br]
 
93
                Raw       - raw, non-buffered access[br]
94
94
                ReadOnly     - opens the file read-only[br]
95
95
                WriteOnly    - opens the file write-only[br]
96
96
                ReadWrite    - opens the file in read-write mode[br]
235
235
        {
236
236
                for ( int idx=0;idx<modes.count();idx++)
237
237
                {
238
 
                        int found=false;
239
 
                        for(unsigned int j = 0; j < mod_num; j++)
 
238
                        int found=false;
 
239
                        for(unsigned int j = 0; j < mod_num; j++)
240
240
                        {
241
 
 
242
 
                                if(KviQString::equalCI(modes.at(idx), mod_tbl[j]))
 
241
                                if(KviQString::equalCI(modes.at(idx), mod_tbl[j]))
243
242
                                {
244
 
                                        mod=mod_cod[j];
245
 
                                        found=true;
 
243
                                        mod=mod_cod[j];
 
244
                                        found=true;
246
245
                                        break;
247
246
                                }
248
247
                        }
249
 
                        if(found)
 
248
                        if(found)
250
249
                                sum = sum | mod;
251
250
                        else
252
251
                                c->warning(__tr2qs_ctx("No such open mode '%Q'","objects"),&modes.at(idx));
253
252
                }
254
253
        }
255
 
        c->returnValue()->setBoolean(m_pFile->open(sum));
 
254
        c->returnValue()->setBoolean(m_pFile->open(sum));
256
255
        return true;
257
256
}
258
257
 
560
559
        CHECK_INTERNAL_POINTER(m_pFile)
561
560
        CHECK_FILE_IS_OPEN
562
561
        QString buffer;
563
 
        //bool ok=KviFileUtils::readLine(m_pFile,buffer);
564
 
        buffer=m_pFile->readLine();
565
 
        c->returnValue()->setString(buffer);
 
562
        //bool ok=KviFileUtils::readLine(m_pFile,buffer);
 
563
        buffer=m_pFile->readLine();
 
564
        c->returnValue()->setString(buffer);
566
565
        return true;
567
566
}
568
567