MCPcopy Create free account
hub / github.com/MITK/MITK / open

Method open

Utilities/qtsingleapplication/qtlockedfile.cpp:121–129  ·  view source on GitHub ↗

! Opens the file in OpenMode \a mode. This is identical to QFile::open(), with the one exception that the Truncate mode flag is disallowed. Truncation would conflict with the advisory file locking, since the file would be modified before the write lock is obtained. If truncation is required, use resize(0) after obtaining the write lock. Returns true if successful; otherwise false.

Source from the content-addressed store, hash-verified

119 \sa QFile::open(), QFile::resize()
120*/
121bool QtLockedFile::open(OpenMode mode)
122{
123 if (mode & QIODevice::Truncate)
124 {
125 qWarning("QtLockedFile::open(): Truncate mode not allowed.");
126 return false;
127 }
128 return QFile::open(mode);
129}
130
131/*!
132 Returns \e true if this object has a in read or write lock;

Callers 15

mainFunction · 0.45
ReadFileAsStringFunction · 0.45
foreachFunction · 0.45
QtLocalPeerMethod · 0.45
OnPopupMenuTriggeredMethod · 0.45
storeCSVFunction · 0.45
OpenDatabaseMethod · 0.45
ThemeIconMethod · 0.45
writeMethod · 0.45
FeatureResultWriterMethod · 0.45

Calls

no outgoing calls

Tested by 2

TestTempMethodsMethod · 0.36
TestUtf8Method · 0.36