"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/qtsingleapplication/src/qtlockedfile.cpp" between
cb2bib-1.9.9.tar.gz and cb2bib-2.0.0.tar.gz

About: cb2Bib is a multiplatform application for rapidly extracting unformatted, or unstandardized bibliographic references from email alerts, journal Web pages, and PDF files.

qtlockedfile.cpp  (cb2bib-1.9.9):qtlockedfile.cpp  (cb2bib-2.0.0)
skipping to change at line 100 skipping to change at line 100
m_lock_mode = NoLock; m_lock_mode = NoLock;
} }
/*! /*!
Constructs an unlocked QtLockedFile object with file \a name. This Constructs an unlocked QtLockedFile object with file \a name. This
constructor behaves in the same way as \e QFile::QFile(const constructor behaves in the same way as \e QFile::QFile(const
QString&). QString&).
\sa QFile::QFile() \sa QFile::QFile()
*/ */
QtLockedFile::QtLockedFile(const QString &name) QtLockedFile::QtLockedFile(const QString& name)
: QFile(name) : QFile(name)
{ {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
wmutex = 0; wmutex = 0;
rmutex = 0; rmutex = 0;
#endif #endif
m_lock_mode = NoLock; m_lock_mode = NoLock;
} }
/*! /*!
skipping to change at line 125 skipping to change at line 125
advisory file locking, since the file would be modified before the advisory file locking, since the file would be modified before the
write lock is obtained. If truncation is required, use resize(0) write lock is obtained. If truncation is required, use resize(0)
after obtaining the write lock. after obtaining the write lock.
Returns true if successful; otherwise false. Returns true if successful; otherwise false.
\sa QFile::open(), QFile::resize() \sa QFile::open(), QFile::resize()
*/ */
bool QtLockedFile::open(OpenMode mode) bool QtLockedFile::open(OpenMode mode)
{ {
if (mode & QIODevice::Truncate) { if (mode & QIODevice::Truncate)
{
qWarning("QtLockedFile::open(): Truncate mode not allowed."); qWarning("QtLockedFile::open(): Truncate mode not allowed.");
return false; return false;
} }
return QFile::open(mode); return QFile::open(mode);
} }
/*! /*!
Returns \e true if this object has a in read or write lock; Returns \e true if this object has a in read or write lock;
otherwise returns \e false. otherwise returns \e false.
 End of changes. 2 change blocks. 
2 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)