forked from qt-creator/qt-creator
ClearCase: Don't try reading when file cannot be opened
Change-Id: Id403f9ed58fb624aef7f6d54607e19a5dd057fd5 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
dfec256dff
commit
0683042141
@@ -1668,10 +1668,12 @@ bool ClearCasePlugin::vcsCheckIn(const QString &messageFile, const QStringList &
|
|||||||
replaceActivity &= (activity != QLatin1String(Constants::KEEP_ACTIVITY));
|
replaceActivity &= (activity != QLatin1String(Constants::KEEP_ACTIVITY));
|
||||||
if (replaceActivity && !vcsSetActivity(m_checkInView, title, activity))
|
if (replaceActivity && !vcsSetActivity(m_checkInView, title, activity))
|
||||||
return false;
|
return false;
|
||||||
|
QString message;
|
||||||
QFile msgFile(messageFile);
|
QFile msgFile(messageFile);
|
||||||
msgFile.open(QFile::ReadOnly | QFile::Text);
|
if (msgFile.open(QFile::ReadOnly | QFile::Text)) {
|
||||||
QString message = QString::fromLocal8Bit(msgFile.readAll().trimmed().constData());
|
message = QString::fromLocal8Bit(msgFile.readAll().trimmed());
|
||||||
msgFile.close();
|
msgFile.close();
|
||||||
|
}
|
||||||
QStringList args;
|
QStringList args;
|
||||||
args << QLatin1String("checkin");
|
args << QLatin1String("checkin");
|
||||||
if (message.isEmpty())
|
if (message.isEmpty())
|
||||||
|
Reference in New Issue
Block a user