summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libs/qmldebug/qpacketprotocol.cpp1
-rw-r--r--src/libs/ssh/sshchannelmanager.cpp11
-rw-r--r--src/libs/ssh/sshcryptofacility.cpp5
-rw-r--r--src/plugins/coreplugin/editormanager/editorview.cpp1
-rw-r--r--src/plugins/madde/maemodeploybymountsteps.cpp3
-rw-r--r--src/plugins/madde/maemoremotecopyfacility.cpp4
-rw-r--r--src/plugins/madde/maemoremotecopyfacility.h3
-rw-r--r--src/plugins/qmlprojectmanager/qmlproject.cpp2
8 files changed, 19 insertions, 11 deletions
diff --git a/src/libs/qmldebug/qpacketprotocol.cpp b/src/libs/qmldebug/qpacketprotocol.cpp
index 57675e4ca3..d9aa7493a9 100644
--- a/src/libs/qmldebug/qpacketprotocol.cpp
+++ b/src/libs/qmldebug/qpacketprotocol.cpp
@@ -282,6 +282,7 @@ void QPacketProtocol::send(const QPacket & p)
Q_ASSERT(writeBytes == sizeof(qint32));
writeBytes = d->dev->write(p.b);
Q_ASSERT(writeBytes == p.b.size());
+ Q_UNUSED(writeBytes); // For building in release mode.
}
/*!
diff --git a/src/libs/ssh/sshchannelmanager.cpp b/src/libs/ssh/sshchannelmanager.cpp
index 71df3987eb..6949d4e45f 100644
--- a/src/libs/ssh/sshchannelmanager.cpp
+++ b/src/libs/ssh/sshchannelmanager.cpp
@@ -211,9 +211,16 @@ int SshChannelManager::channelCount() const
void SshChannelManager::removeChannel(ChannelIterator it)
{
- Q_ASSERT(it != m_channels.end() && "Unexpected channel lookup failure.");
+ if (it == m_channels.end()) {
+ throw SshClientException(SshInternalError,
+ QLatin1String("Internal error: Unexpected channel lookup failure"));
+ }
const int removeCount = m_sessions.remove(it.value());
- Q_ASSERT(removeCount == 1 && "Session for channel not found.");
+ if (removeCount != 1) {
+ throw SshClientException(SshInternalError,
+ QString::fromLocal8Bit("Internal error: Unexpected session count %1 for channel.")
+ .arg(removeCount));
+ }
m_channels.erase(it);
}
diff --git a/src/libs/ssh/sshcryptofacility.cpp b/src/libs/ssh/sshcryptofacility.cpp
index 255ef7ef74..24fd747084 100644
--- a/src/libs/ssh/sshcryptofacility.cpp
+++ b/src/libs/ssh/sshcryptofacility.cpp
@@ -112,7 +112,10 @@ void SshAbstractCryptoFacility::convert(QByteArray &data, quint32 offset,
dataSize);
quint32 bytesRead = m_pipe->read(reinterpret_cast<byte *>(data.data()) + offset,
dataSize, m_pipe->message_count() - 1); // Can't use Pipe::LAST_MESSAGE because of a VC bug.
- Q_ASSERT(bytesRead == dataSize);
+ if (bytesRead != dataSize) {
+ throw SshClientException(SshInternalError,
+ QLatin1String("Internal error: Botan::Pipe::read() returned unexpected value"));
+ }
}
QByteArray SshAbstractCryptoFacility::generateMac(const QByteArray &data,
diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp
index 8529541e35..a4a9a7c870 100644
--- a/src/plugins/coreplugin/editormanager/editorview.cpp
+++ b/src/plugins/coreplugin/editormanager/editorview.cpp
@@ -455,6 +455,7 @@ void EditorView::goForwardInNavigationHistory()
SplitterOrView::SplitterOrView(OpenEditorsModel *model)
{
Q_ASSERT(model);
+ Q_UNUSED(model); // For building in release mode.
m_isRoot = true;
m_layout = new QStackedLayout(this);
m_view = new EditorView();
diff --git a/src/plugins/madde/maemodeploybymountsteps.cpp b/src/plugins/madde/maemodeploybymountsteps.cpp
index 9da25792e0..9ff045826e 100644
--- a/src/plugins/madde/maemodeploybymountsteps.cpp
+++ b/src/plugins/madde/maemodeploybymountsteps.cpp
@@ -353,8 +353,7 @@ QList<MaemoMountSpecification> MaemoMountAndCopyFilesService::mountSpecification
void MaemoMountAndCopyFilesService::doInstall()
{
- m_copyFacility->copyFiles(connection(), deviceConfiguration(), m_filesToCopy,
- deployMountPoint());
+ m_copyFacility->copyFiles(deviceConfiguration(), m_filesToCopy, deployMountPoint());
}
void MaemoMountAndCopyFilesService::cancelInstallation()
diff --git a/src/plugins/madde/maemoremotecopyfacility.cpp b/src/plugins/madde/maemoremotecopyfacility.cpp
index 9a2386f6e9..c981c41c7f 100644
--- a/src/plugins/madde/maemoremotecopyfacility.cpp
+++ b/src/plugins/madde/maemoremotecopyfacility.cpp
@@ -49,11 +49,9 @@ MaemoRemoteCopyFacility::MaemoRemoteCopyFacility(QObject *parent) :
MaemoRemoteCopyFacility::~MaemoRemoteCopyFacility() {}
-void MaemoRemoteCopyFacility::copyFiles(SshConnection *connection,
- const IDevice::ConstPtr &device,
+void MaemoRemoteCopyFacility::copyFiles(const IDevice::ConstPtr &device,
const QList<DeployableFile> &deployables, const QString &mountPoint)
{
- Q_ASSERT(connection->state() == SshConnection::Connected);
Q_ASSERT(!m_isCopying);
m_devConf = device;
diff --git a/src/plugins/madde/maemoremotecopyfacility.h b/src/plugins/madde/maemoremotecopyfacility.h
index ae88139348..ef9955dc22 100644
--- a/src/plugins/madde/maemoremotecopyfacility.h
+++ b/src/plugins/madde/maemoremotecopyfacility.h
@@ -51,8 +51,7 @@ public:
explicit MaemoRemoteCopyFacility(QObject *parent = 0);
~MaemoRemoteCopyFacility();
- void copyFiles(QSsh::SshConnection *connection,
- const ProjectExplorer::IDevice::ConstPtr &device,
+ void copyFiles(const ProjectExplorer::IDevice::ConstPtr &device,
const QList<ProjectExplorer::DeployableFile> &deployables, const QString &mountPoint);
void cancel();
diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp
index e4100d6a14..5abbb8db12 100644
--- a/src/plugins/qmlprojectmanager/qmlproject.cpp
+++ b/src/plugins/qmlprojectmanager/qmlproject.cpp
@@ -81,7 +81,7 @@ public:
if (!version || version->type() != QLatin1String(QtSupport::Constants::DESKTOPQT))
return false;
- bool hasViewer;
+ bool hasViewer = false; // Initialization needed for dumb compilers.
QtSupport::QtVersionNumber minVersion;
switch (import) {
case QmlProject::UnknownImport: