diff options
Diffstat (limited to 'src/shared')
27 files changed, 57 insertions, 57 deletions
diff --git a/src/shared/cpaster/cgi.cpp b/src/shared/cpaster/cgi.cpp index a6c37904ff..91ef6b7281 100644 --- a/src/shared/cpaster/cgi.cpp +++ b/src/shared/cpaster/cgi.cpp @@ -39,7 +39,7 @@ QString CGI::encodeURL(const QString &rawText) QByteArray utf = rawText.toUtf8(); QString enc; enc.reserve(utf.length()); // Make sure we at least have space for a normal US-ASCII URL - + QByteArray::const_iterator it = utf.constBegin(); while (it != utf.constEnd()) { char ch = *it; diff --git a/src/shared/cpaster/splitter.cpp b/src/shared/cpaster/splitter.cpp index e08411d52c..34e13ca0e1 100644 --- a/src/shared/cpaster/splitter.cpp +++ b/src/shared/cpaster/splitter.cpp @@ -62,7 +62,7 @@ FileDataList splitDiffToFiles(const QByteArray &data) // The algorithm works like this: // On the first match we only get the filename of the first patch part // On the second match (if any) we get the diff content, and the name of the next file patch - + while (-1 != (splitIndex = splitExpr.indexIn(strData,splitIndex))) { if (!filename.isEmpty()) { QString content = strData.mid(previousSplit, splitIndex - previousSplit); diff --git a/src/shared/cplusplus/Parser.cpp b/src/shared/cplusplus/Parser.cpp index bad5233f02..670ba02fed 100644 --- a/src/shared/cplusplus/Parser.cpp +++ b/src/shared/cplusplus/Parser.cpp @@ -2206,7 +2206,7 @@ bool Parser::maybeAmbiguousStatement(DeclarationStatementAST *ast) const if (declarator->postfix_declarators && declarator->postfix_declarators->asFunctionDeclarator() && ! declarator->initializer) { return false; - } + } } return true; diff --git a/src/shared/designerintegrationv2/formresizer.h b/src/shared/designerintegrationv2/formresizer.h index fc46e18e65..fb283f2a7f 100644 --- a/src/shared/designerintegrationv2/formresizer.h +++ b/src/shared/designerintegrationv2/formresizer.h @@ -52,7 +52,7 @@ class SizeHandleRect; * | | * | | * Handles QVBoxLayout [margin: SELECTION_MARGIN] - * | + * | * Frame [margin: lineWidth] * | * QVBoxLayout diff --git a/src/shared/help/bookmarkmanager.cpp b/src/shared/help/bookmarkmanager.cpp index 4a088bee51..e804ffbb2c 100644 --- a/src/shared/help/bookmarkmanager.cpp +++ b/src/shared/help/bookmarkmanager.cpp @@ -610,7 +610,7 @@ BookmarkManager::BookmarkManager(QHelpEngineCore* _helpEngine) { bookmarkIcon = QIcon(QLatin1String(":/help/images/bookmark.png")); folderIcon = QApplication::style()->standardIcon(QStyle::SP_DirClosedIcon); - + connect(treeModel, SIGNAL(itemChanged(QStandardItem*)), this, SLOT(itemChanged(QStandardItem*))); } @@ -719,7 +719,7 @@ void BookmarkManager::addNewBookmark(const QModelIndex& index, item->setIcon(bookmarkIcon); item->setData(false, Qt::UserRole + 11); item->setData(url, Qt::UserRole + 10); - + if (index.isValid()) treeModel->itemFromIndex(index)->appendRow(item); else diff --git a/src/shared/help/bookmarkmanager.h b/src/shared/help/bookmarkmanager.h index e0fba25ae2..76ae6256f2 100644 --- a/src/shared/help/bookmarkmanager.h +++ b/src/shared/help/bookmarkmanager.h @@ -64,7 +64,7 @@ class BookmarkDialog : public QDialog Q_OBJECT public: - BookmarkDialog(BookmarkManager *manager, const QString &title, + BookmarkDialog(BookmarkManager *manager, const QString &title, const QString &url, QWidget *parent = 0); ~BookmarkDialog(); @@ -77,7 +77,7 @@ private slots: void selectBookmarkFolder(const QString &folderName); void customContextMenuRequested(const QPoint &point); void currentChanged(const QModelIndex& current); - + private: bool eventFilter(QObject *object, QEvent *e); @@ -175,7 +175,7 @@ public: private slots: void itemChanged(QStandardItem *item); -private: +private: QString uniqueFolderName() const; void removeBookmarkFolderItems(QStandardItem *item); void readBookmarksRecursive(const QStandardItem *item, QDataStream &stream, diff --git a/src/shared/help/indexwindow.cpp b/src/shared/help/indexwindow.cpp index c1eea45e54..10ca5e7aae 100644 --- a/src/shared/help/indexwindow.cpp +++ b/src/shared/help/indexwindow.cpp @@ -183,7 +183,7 @@ void IndexWindow::open(QHelpIndexWidget* indexWidget, const QModelIndex &index) QUrl url; if (links.count() > 1) { TopicChooser tc(this, keyword, links); - if (tc.exec() == QDialog::Accepted) + if (tc.exec() == QDialog::Accepted) url = tc.link(); } else if (links.count() == 1) { url = links.constBegin().value(); diff --git a/src/shared/help/topicchooser.cpp b/src/shared/help/topicchooser.cpp index dea020f615..f2db5acd0d 100644 --- a/src/shared/help/topicchooser.cpp +++ b/src/shared/help/topicchooser.cpp @@ -45,7 +45,7 @@ TopicChooser::TopicChooser(QWidget *parent, const QString &keyword, QMap<QString, QUrl>::const_iterator it = m_links.constBegin(); for (; it != m_links.constEnd(); ++it) ui.listWidget->addItem(it.key()); - + if (ui.listWidget->count() != 0) ui.listWidget->setCurrentRow(0); ui.listWidget->setFocus(); diff --git a/src/shared/help/topicchooser.h b/src/shared/help/topicchooser.h index c75945425f..9258fe48ee 100644 --- a/src/shared/help/topicchooser.h +++ b/src/shared/help/topicchooser.h @@ -48,8 +48,8 @@ public: TopicChooser(QWidget *parent, const QString &keyword, const QMap<QString, QUrl> &links); - QUrl link() const; - + QUrl link() const; + private: Ui::TopicChooser ui; QMap<QString, QUrl> m_links; diff --git a/src/shared/proparser/procommandmanager.cpp b/src/shared/proparser/procommandmanager.cpp index 745fc7a270..e501bd1b86 100644 --- a/src/shared/proparser/procommandmanager.cpp +++ b/src/shared/proparser/procommandmanager.cpp @@ -67,7 +67,7 @@ ProCommandManager::ProCommandManager(QObject *parent) ProCommandManager::~ProCommandManager() { - qDeleteAll(m_groups); + qDeleteAll(m_groups); } void ProCommandManager::beginGroup(const QString &name) @@ -80,7 +80,7 @@ void ProCommandManager::beginGroup(const QString &name) delete m_groups.takeLast(); m_pos = m_groups.count(); } - + m_group = new ProCommandGroup(name); } diff --git a/src/shared/proparser/procommandmanager.h b/src/shared/proparser/procommandmanager.h index 4929ee210e..5165346de0 100644 --- a/src/shared/proparser/procommandmanager.h +++ b/src/shared/proparser/procommandmanager.h @@ -40,7 +40,7 @@ QT_END_NAMESPACE namespace Qt4ProjectManager { namespace Internal { - + class ProCommand { public: @@ -97,7 +97,7 @@ signals: private: ProCommandGroup *m_group; QList<ProCommandGroup *> m_groups; - + int m_pos; ProCommandGroup *m_savepoint; }; diff --git a/src/shared/proparser/proeditormodel.cpp b/src/shared/proparser/proeditormodel.cpp index dcdab35fe2..c4e0122dc4 100644 --- a/src/shared/proparser/proeditormodel.cpp +++ b/src/shared/proparser/proeditormodel.cpp @@ -42,7 +42,7 @@ using namespace Qt4ProjectManager::Internal; namespace Qt4ProjectManager { namespace Internal { - + class ProAddCommand : public ProCommand { public: @@ -707,7 +707,7 @@ bool ProEditorModel::insertModelItem(ProItem *item, int row, const QModelIndex & beginInsertRows(parent, row, row); block->setItems(proitems); endInsertRows(); - + markProFileModified(parent); return true; } @@ -728,7 +728,7 @@ bool ProEditorModel::insertItem(ProItem *item, int row, const QModelIndex &paren void ProEditorModel::markProFileModified(QModelIndex index) { - while (index.isValid()) { + while (index.isValid()) { if (proItem(index)->kind() == ProItem::BlockKind) { ProBlock * block = proBlock(index); if (block->blockKind() == ProBlock::ProFileKind) { diff --git a/src/shared/proparser/proeditormodel.h b/src/shared/proparser/proeditormodel.h index 00ba4bb710..5c5b518b7c 100644 --- a/src/shared/proparser/proeditormodel.h +++ b/src/shared/proparser/proeditormodel.h @@ -77,7 +77,7 @@ public: ProBlock *proBlock(const QModelIndex &index) const; ProVariable *proVariable(const QModelIndex &index) const; - QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; + QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; QModelIndex parent(const QModelIndex &index) const; int rowCount(const QModelIndex &parent = QModelIndex()) const; int columnCount(const QModelIndex &parent = QModelIndex()) const; @@ -118,12 +118,12 @@ class ProScopeFilter : public QSortFilterProxyModel Q_OBJECT public: - enum CheckableType { + enum CheckableType { None, - Variable, + Variable, Blocks }; - + void setVariableFilter(const QStringList &vars); void setCheckable( CheckableType ct ); diff --git a/src/shared/proparser/proiteminfo.cpp b/src/shared/proparser/proiteminfo.cpp index 165a96aea5..ff38c5d778 100644 --- a/src/shared/proparser/proiteminfo.cpp +++ b/src/shared/proparser/proiteminfo.cpp @@ -93,7 +93,7 @@ ProVariableInfo::~ProVariableInfo() void ProVariableInfo::addValue(ProValueInfo *value) { - m_values.insert(value->id(), value); + m_values.insert(value->id(), value); } void ProVariableInfo::setMultiple(bool multiple) diff --git a/src/shared/proparser/prowriter.cpp b/src/shared/proparser/prowriter.cpp index 39236c0656..543434cc45 100644 --- a/src/shared/proparser/prowriter.cpp +++ b/src/shared/proparser/prowriter.cpp @@ -45,7 +45,7 @@ bool ProWriter::write(ProFile *profile, const QString &fileName) m_out.setDevice(&data); writeItem(profile, QString()); data.close(); - + return true; } @@ -64,7 +64,7 @@ QString ProWriter::contents(ProFile *profile) QString ProWriter::fixComment(const QString &comment, const QString &indent) const { QString result = comment; - result = result.replace(QLatin1Char('\n'), + result = result.replace(QLatin1Char('\n'), QLatin1Char('\n') + indent + QLatin1String("# ")); return QLatin1String("# ") + result; } @@ -75,7 +75,7 @@ void ProWriter::writeValue(ProValue *value, const QString &indent) m_out << indent << QLatin1String(" "); m_writeState &= ~NewLine; } - + m_out << value->value(); if (!(m_writeState & LastItem)) diff --git a/src/shared/proparser/proxml.cpp b/src/shared/proparser/proxml.cpp index 8e31271bf2..2556f00394 100644 --- a/src/shared/proparser/proxml.cpp +++ b/src/shared/proparser/proxml.cpp @@ -48,7 +48,7 @@ QString ProXmlParser::itemToString(ProItem *item) QDomNode ProXmlParser::createItemNode(QDomDocument doc, ProItem *item) const { - + QDomElement tag; if (item->kind() == ProItem::ValueKind) { tag = doc.createElement(QLatin1String("value")); @@ -106,14 +106,14 @@ QDomNode ProXmlParser::createItemNode(QDomDocument doc, ProItem *item) const tag.appendChild(childNode); } } - + QString comment = item->comment(); comment = comment.replace('\\', QLatin1String("\\\\")); comment = comment.replace('\n', QLatin1String("\\n")); if (!comment.isEmpty()) tag.setAttribute(QLatin1String("comment"), comment); - + return tag; } diff --git a/src/shared/qrceditor/resourcefile_p.h b/src/shared/qrceditor/resourcefile_p.h index 3d02d596cb..cb4bc2a368 100644 --- a/src/shared/qrceditor/resourcefile_p.h +++ b/src/shared/qrceditor/resourcefile_p.h @@ -145,7 +145,7 @@ public: void removePrefix(int prefix_idx); void removeFile(int prefix_idx, int file_idx); - + void replacePrefix(int prefix_idx, const QString &prefix); void replaceLang(int prefix_idx, const QString &lang); void replaceAlias(int prefix_idx, int file_idx, const QString &alias); diff --git a/src/shared/qrceditor/resourceview.h b/src/shared/qrceditor/resourceview.h index a7d75748d5..503249837b 100644 --- a/src/shared/qrceditor/resourceview.h +++ b/src/shared/qrceditor/resourceview.h @@ -94,7 +94,7 @@ public: bool isDirty() const; void setDirty(bool dirty); - void enableContextMenu(bool enable); + void enableContextMenu(bool enable); void addFiles(QStringList fileList, const QModelIndex &index); diff --git a/src/shared/qtlockedfile/qtlockedfile.h b/src/shared/qtlockedfile/qtlockedfile.h index ebf7217182..3ee58a8076 100644 --- a/src/shared/qtlockedfile/qtlockedfile.h +++ b/src/shared/qtlockedfile/qtlockedfile.h @@ -52,18 +52,18 @@ namespace SharedTools { class QT_QTLOCKEDFILE_EXPORT QtLockedFile : public QFile { -public: +public: enum LockMode { NoLock = 0, ReadLock, WriteLock }; QtLockedFile(); QtLockedFile(const QString &name); ~QtLockedFile(); - + bool lock(LockMode mode, bool block = true); bool unlock(); bool isLocked() const; LockMode lockMode() const; - + private: #ifdef Q_OS_WIN Qt::HANDLE m_semaphore_hnd; diff --git a/src/shared/qtlockedfile/qtlockedfile_unix.cpp b/src/shared/qtlockedfile/qtlockedfile_unix.cpp index b83129e370..32930ef003 100644 --- a/src/shared/qtlockedfile/qtlockedfile_unix.cpp +++ b/src/shared/qtlockedfile/qtlockedfile_unix.cpp @@ -42,10 +42,10 @@ bool QtLockedFile::lock(LockMode mode, bool block) qWarning("QtLockedFile::lock(): file is not opened"); return false; } - + if (mode == NoLock) return unlock(); - + if (mode == m_lock_mode) return true; @@ -59,14 +59,14 @@ bool QtLockedFile::lock(LockMode mode, bool block) fl.l_type = (mode == ReadLock) ? F_RDLCK : F_WRLCK; int cmd = block ? F_SETLKW : F_SETLK; int ret = fcntl(handle(), cmd, &fl); - + if (ret == -1) { if (errno != EINTR && errno != EAGAIN) qWarning("QtLockedFile::lock(): fcntl: %s", strerror(errno)); return false; } - + m_lock_mode = mode; return true; } @@ -88,12 +88,12 @@ bool QtLockedFile::unlock() fl.l_len = 0; fl.l_type = F_UNLCK; int ret = fcntl(handle(), F_SETLKW, &fl); - + if (ret == -1) { qWarning("QtLockedFile::lock(): fcntl: %s", strerror(errno)); return false; } - + m_lock_mode = NoLock; return true; } diff --git a/src/shared/trk/bluetoothlistener.cpp b/src/shared/trk/bluetoothlistener.cpp index 1f5ccbe51b..08392320be 100644 --- a/src/shared/trk/bluetoothlistener.cpp +++ b/src/shared/trk/bluetoothlistener.cpp @@ -172,7 +172,7 @@ bool BluetoothListener::start(const QString &device, QString *errorMessage) return true; } -void BluetoothListener::slotStdOutput() +void BluetoothListener::slotStdOutput() { emitMessage(QString::fromLocal8Bit(d->process.readAllStandardOutput())); } diff --git a/src/shared/trk/bluetoothlistener_gui.cpp b/src/shared/trk/bluetoothlistener_gui.cpp index 9b6dbd3bc6..7463a03060 100644 --- a/src/shared/trk/bluetoothlistener_gui.cpp +++ b/src/shared/trk/bluetoothlistener_gui.cpp @@ -61,7 +61,7 @@ PromptStartCommunicationResult QMessageBox messageBox(QMessageBox::Information, msgBoxTitle, msgBoxText, QMessageBox::Cancel, msgBoxParent); QObject::connect(&starter, SIGNAL(connected()), &messageBox, SLOT(close())); QObject::connect(&starter, SIGNAL(timeout()), &messageBox, SLOT(close())); - messageBox.exec(); + messageBox.exec(); // Only starter.state() is reliable here to obtain the state. switch (starter.state()) { case AbstractBluetoothStarter::Running: diff --git a/src/shared/trk/launcher.cpp b/src/shared/trk/launcher.cpp index 8be5dcd132..b354a7e1db 100644 --- a/src/shared/trk/launcher.cpp +++ b/src/shared/trk/launcher.cpp @@ -88,7 +88,7 @@ Launcher::Launcher(Actions startupActions, d(new LauncherPrivate(dev)) { d->m_startupActions = startupActions; - connect(d->m_device.data(), SIGNAL(messageReceived(trk::TrkResult)), this, SLOT(handleResult(trk::TrkResult))); + connect(d->m_device.data(), SIGNAL(messageReceived(trk::TrkResult)), this, SLOT(handleResult(trk::TrkResult))); connect(this, SIGNAL(finished()), d->m_device.data(), SLOT(close())); } diff --git a/src/shared/trk/launcher.h b/src/shared/trk/launcher.h index c70b05c879..a17bace477 100644 --- a/src/shared/trk/launcher.h +++ b/src/shared/trk/launcher.h @@ -84,7 +84,7 @@ public: void setInstallFileName(const QString &name); void setCommandLineArgs(const QStringList &args); bool startServer(QString *errorMessage); - void setVerbose(int v); + void setVerbose(int v); void setSerialFrame(bool b); bool serialFrame() const; // Close device or leave it open diff --git a/src/shared/trk/trkdevice.cpp b/src/shared/trk/trkdevice.cpp index a76cff79c2..b2316f99ec 100644 --- a/src/shared/trk/trkdevice.cpp +++ b/src/shared/trk/trkdevice.cpp @@ -134,7 +134,7 @@ namespace trk { /////////////////////////////////////////////////////////////////////// class TrkWriteQueue -{ +{ Q_DISABLE_COPY(TrkWriteQueue) public: explicit TrkWriteQueue(); @@ -325,7 +325,7 @@ DeviceContext::DeviceContext() : class WriterThread : public QThread { Q_OBJECT Q_DISABLE_COPY(WriterThread) -public: +public: explicit WriterThread(const QSharedPointer<DeviceContext> &context); // Enqueue messages. @@ -350,7 +350,7 @@ public slots: private slots: void invokeNoopMessage(const trk::TrkMessage &); -private: +private: bool write(const QByteArray &data, QString *errorMessage); inline int writePendingMessage(); @@ -658,7 +658,7 @@ int WinReaderThread::tryRead() if (!ClearCommError(m_context->device, NULL, &comStat)){ emit error(QString::fromLatin1("ClearCommError failed: %1").arg(winErrorMessage(GetLastError()))); return -7; - } + } const DWORD bytesToRead = qMax(DWORD(1), qMin(comStat.cbInQue, DWORD(BufSize))); // Trigger read DWORD bytesRead = 0; @@ -674,7 +674,7 @@ int WinReaderThread::tryRead() if (readError != ERROR_IO_PENDING) { emit error(QString::fromLatin1("Read error: %1").arg(winErrorMessage(readError))); return -1; - } + } // Wait for either termination or data const DWORD wr = WaitForMultipleObjects(HandleCount, m_handles, false, INFINITE); if (wr == WAIT_FAILED) { @@ -749,7 +749,7 @@ private: int m_terminatePipeFileDescriptors[2]; }; -UnixReaderThread::UnixReaderThread(const QSharedPointer<DeviceContext> &context) : +UnixReaderThread::UnixReaderThread(const QSharedPointer<DeviceContext> &context) : ReaderThreadBase(context) { m_terminatePipeFileDescriptors[0] = m_terminatePipeFileDescriptors[1] = -1; @@ -943,8 +943,8 @@ bool TrkDevice::open(const QString &port, QString *errorMessage) d->writerThread = QSharedPointer<WriterThread>(new WriterThread(d->deviceContext)); connect(d->writerThread.data(), SIGNAL(error(QString)), this, SLOT(emitError(QString)), - Qt::QueuedConnection); - d->writerThread->start(); + Qt::QueuedConnection); + d->writerThread->start(); if (d->verbose) qDebug() << "Opened" << port; @@ -1009,7 +1009,7 @@ void TrkDevice::setVerbose(int b) void TrkDevice::slotMessageReceived(const trk::TrkResult &result, const QByteArray &rawData) { d->writerThread->slotHandleResult(result); - emit messageReceived(result); + emit messageReceived(result); if (!rawData.isEmpty()) emit rawDataReceived(rawData); } diff --git a/src/shared/trk/trkdevice.h b/src/shared/trk/trkdevice.h index 632dea1b24..fd6a961b08 100644 --- a/src/shared/trk/trkdevice.h +++ b/src/shared/trk/trkdevice.h @@ -51,7 +51,7 @@ struct TrkDevicePrivate; * Trk communications. Provides synchronous write and asynchronous * read operation. * The serialFrames property specifies whether packets are encapsulated in - * "0x90 <length>" frames, which is currently the case for serial ports. + * "0x90 <length>" frames, which is currently the case for serial ports. * Contains a write message queue allowing * for queueing messages with a notification callback. If the message receives * an ACK, the callback is invoked. diff --git a/src/shared/trk/trkutils.h b/src/shared/trk/trkutils.h index 4ba51fa42b..824c67bb9e 100644 --- a/src/shared/trk/trkutils.h +++ b/src/shared/trk/trkutils.h @@ -109,7 +109,7 @@ struct Library struct TrkAppVersion { TrkAppVersion(); - void reset(); + void reset(); int trkMajor; int trkMinor; |