~ubuntu-branches/ubuntu/karmic/k3b/karmic

« back to all changes in this revision

Viewing changes to plugins/encoder/external/k3bexternalencoder.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2009-10-16 22:32:25 UTC
  • mfrom: (1.1.19 upstream)
  • Revision ID: james.westby@ubuntu.com-20091016223225-flhn4579879piihp
Tags: 1.68.0~alpha3-0ubuntu1
* New upstream release
* Add translations from svn into po/
* Set KUBUNTU_DESKTOP_POT in debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 *
3
 
 *
4
 
 * Copyright (C) 2003-2008 Sebastian Trueg <trueg@k3b.org>
 
2
 * Copyright (C) 2003-2009 Sebastian Trueg <trueg@k3b.org>
5
3
 *
6
4
 * This file is part of the K3b project.
7
 
 * Copyright (C) 1998-2008 Sebastian Trueg <trueg@k3b.org>
 
5
 * Copyright (C) 1998-2009 Sebastian Trueg <trueg@k3b.org>
8
6
 *
9
7
 * This program is free software; you can redistribute it and/or modify
10
8
 * it under the terms of the GNU General Public License as published by
26
24
#include <kstandarddirs.h>
27
25
#include <KProcess>
28
26
 
29
 
#include <qregexp.h>
30
 
#include <qfile.h>
31
 
#include <QList>
 
27
#include <QtCore/QRegExp>
 
28
#include <QtCore/QFile>
 
29
#include <QtCore/QList>
32
30
 
33
31
#include <sys/types.h>
34
32
 
289
287
        return false;
290
288
    }
291
289
 
292
 
    return true;
 
290
    return d->process->waitForBytesWritten( -1 );
293
291
}
294
292
 
295
293
 
303
301
 
304
302
        long written = 0;
305
303
 
306
 
        //
307
 
        // we swap the bytes to reduce user irritation ;)
308
 
        // This is a little confused: We used to swap the byte order
309
 
        // in older versions of this encoder since little endian seems
310
 
        // to "feel" more natural.
311
 
        // So now that we have a swap option we have to invert it to ensure
312
 
        // compatibility
313
 
        //
314
 
        if( !d->cmd.swapByteOrder ) {
 
304
        if( d->cmd.swapByteOrder ) {
315
305
            char* buffer = new char[len];
316
306
            for( unsigned int i = 0; i < len-1; i+=2 ) {
317
307
                buffer[i] = data[i+1];
324
314
        else
325
315
            written = d->process->write( data, len );
326
316
 
 
317
        d->process->waitForBytesWritten( -1 );
 
318
 
327
319
        return written;
328
320
    }
329
321
    else