clean up compile warnings

This commit is contained in:
royqh1979 2021-10-20 18:05:43 +08:00
parent e2751fc693
commit 5c9ef2035e
31 changed files with 166 additions and 109 deletions

View File

@ -223,7 +223,7 @@ void CompilerManager::stopCheckSyntax()
mBackgroundSyntaxChecker->stopCompile();
}
bool CompilerManager::canCompile(const QString &filename)
bool CompilerManager::canCompile(const QString &)
{
return !compiling();
}

View File

@ -96,8 +96,8 @@ void ExecutableRunner::run()
case QProcess::ReadError:
emit runErrorOccurred(tr("An error occurred when attempting to read from the runner process."));
break;
// default:
// emit runErrorOccurred(tr("An unknown error occurred."));
default:
break;
}
}
emit terminated();

View File

@ -103,7 +103,7 @@ void CppRefacter::renameSymbol(Editor *editor, const BufferCoord &pos, const QSt
tr("New symbol already exists!"));
return;
}
renameSymbolInFile(editor->filename(),oldStatement,word,newWord, editor->parser());
renameSymbolInFile(editor->filename(),oldStatement,newWord, editor->parser());
}
PSearchResultTreeItem CppRefacter::findOccurenceInFile(
@ -173,7 +173,7 @@ PSearchResultTreeItem CppRefacter::findOccurenceInFile(
return parentItem;
}
void CppRefacter::renameSymbolInFile(const QString &filename, const PStatement &statement, const QString &word, const QString &newWord, const PCppParser &parser)
void CppRefacter::renameSymbolInFile(const QString &filename, const PStatement &statement, const QString &newWord, const PCppParser &parser)
{
QStringList buffer;
SynEdit editor;

View File

@ -32,7 +32,6 @@ private:
void renameSymbolInFile(
const QString& filename,
const PStatement& statement,
const QString& word,
const QString& newWord,
const PCppParser& parser);
};

View File

@ -1217,6 +1217,8 @@ void DebugReader::processDebugOutput()
case AnnotationType::TSource:
handleSource();
break;
default:
break;
}
} while (nextAnnotation != AnnotationType::TEOF);
@ -1264,6 +1266,8 @@ QString DebugReader::processEvalOutput()
case AnnotationType::TValueHistoryEnd:
case AnnotationType::TDisplayEnd:
shouldExit = true;
default:
break;
}
result += nextLine;
} while (!shouldExit);
@ -2151,12 +2155,12 @@ RegisterModel::RegisterModel(QObject *parent):QAbstractTableModel(parent)
}
int RegisterModel::rowCount(const QModelIndex &parent) const
int RegisterModel::rowCount(const QModelIndex &) const
{
return mRegisters.count();
}
int RegisterModel::columnCount(const QModelIndex &parent) const
int RegisterModel::columnCount(const QModelIndex &) const
{
return 3;
}

View File

@ -83,7 +83,6 @@ Editor::Editor(QWidget *parent, const QString& filename,
}
QFileInfo fileInfo(mFilename);
if (mParentPageControl!=nullptr) {
int index = mParentPageControl->addTab(this,QString());
updateCaption();
}
@ -1007,6 +1006,9 @@ bool Editor::event(QEvent *event)
case TipType::Error:
if (pSettings->editor().enableIssueToolTips())
hint = getErrorHint(pError);
break;
default:
break;
}
// qDebug()<<"hint:"<<hint;
if (!hint.isEmpty()) {
@ -1922,13 +1924,16 @@ Editor::QuoteStatus Editor::getQuoteStatus()
case QuoteStatus::RawString:
Result=QuoteStatus::RawStringNoEscape;
break;
//case RawStringNoEscape: do nothing
default:
break;
}
} else if (Line[i] == ')') {
switch(Result) {
case QuoteStatus::RawStringNoEscape:
Result=QuoteStatus::RawString;
break;
default:
break;
}
} else if (Line[i] == '"') {
switch(Result) {
@ -1950,7 +1955,8 @@ Editor::QuoteStatus Editor::getQuoteStatus()
case QuoteStatus::RawString:
Result=QuoteStatus::NotQuote;
break;
//RawStringNoEscape: do nothing
default:
break;
}
} else if (Line[i] == '\'') {
switch(Result) {
@ -1969,6 +1975,8 @@ Editor::QuoteStatus Editor::getQuoteStatus()
case QuoteStatus::DoubleQuoteEscape:
Result = QuoteStatus::DoubleQuote;
break;
default:
break;
}
} else if (Line[i] == '\\') {
switch(Result) {
@ -1987,6 +1995,8 @@ Editor::QuoteStatus Editor::getQuoteStatus()
case QuoteStatus::DoubleQuoteEscape:
Result = QuoteStatus::DoubleQuote;
break;
default:
break;
}
} else {
switch(Result) {
@ -2005,6 +2015,8 @@ Editor::QuoteStatus Editor::getQuoteStatus()
case QuoteStatus::DoubleQuoteEscape:
Result = QuoteStatus::DoubleQuote;
break;
default:
break;
}
}
}
@ -2835,7 +2847,7 @@ void Editor::updateFunctionTip()
return;
}
ContentsCoord FFunctionEnd = curPos;
//ContentsCoord FFunctionEnd = curPos;
int paramPos = 0;
bool paramPosFounded = false;
@ -2886,7 +2898,7 @@ void Editor::updateFunctionTip()
return;
}
ContentsCoord FFunctionStart = curPos;
//ContentsCoord FFunctionStart = curPos;
// Skip blanks
while (!curPos.atStart()) {
@ -3069,6 +3081,8 @@ void Editor::onExportedFormatToken(PSynHighlighter syntaxHighlighter, int Line,
case StatementKind::skNamespaceAlias:
attr = cppHighlighter->stringAttribute();
break;
default:
break;
}
}
}

View File

@ -80,6 +80,16 @@ void EditorList::showLayout(LayoutShowType layout)
}
}
QTabWidget *EditorList::rightPageWidget() const
{
return mRightPageWidget;
}
QTabWidget *EditorList::leftPageWidget() const
{
return mLeftPageWidget;
}
Editor* EditorList::getEditor(int index, QTabWidget* tabsWidget) const {
QTabWidget* selectedWidget;
if (tabsWidget == nullptr) {

View File

@ -55,6 +55,10 @@ public:
Editor* operator[](int index);
QTabWidget *leftPageWidget() const;
QTabWidget *rightPageWidget() const;
private:
QTabWidget* getNewEditorPageControl() const;
QTabWidget* getFocusedPageControl() const;

View File

@ -26,7 +26,7 @@ public:
bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override;
};
bool WindowLogoutEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, long *result){
bool WindowLogoutEventFilter::nativeEventFilter(const QByteArray & /*eventType*/, void *message, long *result){
MSG * pMsg = static_cast<MSG *>(message);
if (pMsg->message == WM_QUERYENDSESSION) {
if (pMsg->lParam == 0

View File

@ -1143,57 +1143,46 @@ void MainWindow::debug()
includeOrSkipDirs(mProject->options().libs,
pSettings->debugger().skipProjectLibraries());
break;
case CompileTarget::File:
// Check if we enabled proper options
debugEnabled = compilerSet->getOptionValue("-g3")!='0';
stripEnabled = compilerSet->getOptionValue("-s")!='0';
// Ask the user if he wants to enable debugging...
if (((!debugEnabled) || stripEnabled) &&
(QMessageBox::question(this,
tr("Enable debugging"),
tr("You have not enabled debugging info (-g3) and/or stripped it from the executable (-s) in Compiler Options.<BR /><BR />Do you want to correct this now?")
) == QMessageBox::Yes)) {
// Enable debugging, disable stripping
compilerSet->setOption("-g3",'1');
compilerSet->setOption("-s",'0');
case CompileTarget::File: {
// Check if we enabled proper options
debugEnabled = compilerSet->getOptionValue("-g3")!='0';
stripEnabled = compilerSet->getOptionValue("-s")!='0';
// Ask the user if he wants to enable debugging...
if (((!debugEnabled) || stripEnabled) &&
(QMessageBox::question(this,
tr("Enable debugging"),
tr("You have not enabled debugging info (-g3) and/or stripped it from the executable (-s) in Compiler Options.<BR /><BR />Do you want to correct this now?")
) == QMessageBox::Yes)) {
// Enable debugging, disable stripping
compilerSet->setOption("-g3",'1');
compilerSet->setOption("-s",'0');
// Save changes to compiler set
pSettings->compilerSets().saveSet(pSettings->compilerSets().defaultIndex());
// Save changes to compiler set
pSettings->compilerSets().saveSet(pSettings->compilerSets().defaultIndex());
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
mCompileSuccessionTask->type = CompileSuccessionTaskType::Debug;
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
mCompileSuccessionTask->type = CompileSuccessionTaskType::Debug;
compile();
return;
}
Editor* e = mEditorList->getEditor();
if (e!=nullptr) {
// Did we saved?
if (e->modified()) {
// if file is modified,save it first
if (!e->save(false,false))
return;
compile();
return;
}
// Did we compiled?
filePath = getCompiledExecutableName(e->filename());
debugFile.setFile(filePath);
if (!debugFile.exists()) {
if (QMessageBox::question(this,tr("Compile"),
tr("Source file is not compiled.")+"<BR /><BR />" + tr("Compile now?"),
QMessageBox::Yes|QMessageBox::No,
QMessageBox::Yes) == QMessageBox::Yes) {
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
mCompileSuccessionTask->type = CompileSuccessionTaskType::Debug;
compile();
return;
Editor* e = mEditorList->getEditor();
if (e!=nullptr) {
// Did we saved?
if (e->modified()) {
// if file is modified,save it first
if (!e->save(false,false))
return;
}
} else {
if (compareFileModifiedTime(e->filename(),filePath)>=0) {
// Did we compiled?
filePath = getCompiledExecutableName(e->filename());
debugFile.setFile(filePath);
if (!debugFile.exists()) {
if (QMessageBox::question(this,tr("Compile"),
tr("Source file is more recent than executable.")+"<BR /><BR />" + tr("Recompile?"),
tr("Source file is not compiled.")+"<BR /><BR />" + tr("Compile now?"),
QMessageBox::Yes|QMessageBox::No,
QMessageBox::Yes) == QMessageBox::Yes) {
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
@ -1201,17 +1190,31 @@ void MainWindow::debug()
compile();
return;
}
} else {
if (compareFileModifiedTime(e->filename(),filePath)>=0) {
if (QMessageBox::question(this,tr("Compile"),
tr("Source file is more recent than executable.")+"<BR /><BR />" + tr("Recompile?"),
QMessageBox::Yes|QMessageBox::No,
QMessageBox::Yes) == QMessageBox::Yes) {
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
mCompileSuccessionTask->type = CompileSuccessionTaskType::Debug;
compile();
return;
}
}
}
prepareDebugger();
mDebugger->setUseUTF8(e->fileEncoding() == ENCODING_UTF8 || e->fileEncoding() == ENCODING_UTF8_BOM);
if (!mDebugger->start())
return;
mDebugger->sendCommand("file", QString("\"%1\"").arg(debugFile.filePath().replace('\\','/')));
}
prepareDebugger();
mDebugger->setUseUTF8(e->fileEncoding() == ENCODING_UTF8 || e->fileEncoding() == ENCODING_UTF8_BOM);
if (!mDebugger->start())
return;
mDebugger->sendCommand("file", QString("\"%1\"").arg(debugFile.filePath().replace('\\','/')));
}
break;
default:
break;
}
updateEditorActions();
@ -1263,6 +1266,8 @@ void MainWindow::debug()
mDebugger->sendCommand("start",params);
mDebugger->updateDebugInfo();
break;
default:
break;
}
} else {
QString params;
@ -1286,6 +1291,8 @@ void MainWindow::debug()
mDebugger->sendCommand("run",params);
mDebugger->updateDebugInfo();
break;
default:
break;
}
}
}
@ -1494,7 +1501,7 @@ void MainWindow::saveLastOpens()
Editor * editor = (*mEditorList)[i];
QByteArray sectionName = QString("Editor_%1").arg(i).toLocal8Bit();
lastOpenIni.SetValue(sectionName,"FileName", editor->filename().toLocal8Bit());
lastOpenIni.SetBoolValue(sectionName, "OnLeft",editor->pageControl() != ui->EditorTabsRight);
lastOpenIni.SetBoolValue(sectionName, "OnLeft",editor->pageControl() != mEditorList->rightPageWidget());
lastOpenIni.SetBoolValue(sectionName, "Focused",editor->hasFocus());
lastOpenIni.SetLongValue(sectionName, "CursorCol", editor->caretX());
lastOpenIni.SetLongValue(sectionName, "CursorRow", editor->caretY());
@ -1533,11 +1540,12 @@ void MainWindow::loadLastOpens()
if (!fileExists(editorFilename))
continue;
bool onLeft = lastOpenIni.GetBoolValue(sectionName,"OnLeft",true);
// if onLeft then
// page := EditorList.LeftPageControl
// else
// page := EditorList.RightPageControl;
Editor * editor = mEditorList->newEditor(editorFilename,ENCODING_AUTO_DETECT,false,false);
QTabWidget* page;
if (onLeft)
page = mEditorList->leftPageWidget();
else
page = mEditorList->rightPageWidget();
Editor * editor = mEditorList->newEditor(editorFilename,ENCODING_AUTO_DETECT,false,false,page);
if (!editor)
continue;
BufferCoord pos;
@ -1571,7 +1579,6 @@ void MainWindow::updateTools()
ui->menuTools->addAction(ui->actionOptions);
if (!mToolsManager->tools().isEmpty()) {
ui->menuTools->addSeparator();
int count = 0;
foreach (const PToolItem& item, mToolsManager->tools()) {
QAction* action = new QAction(item->title,ui->menuTools);
connect(action, &QAction::triggered,
@ -1764,7 +1771,7 @@ void MainWindow::buildContextMenus()
tr("Remove all breakpoints"),
ui->tblBreakpoints);
connect(mBreakpointViewRemoveAllAction,&QAction::triggered,
[this](){
[](){
pMainWindow->debugger()->deleteBreakpoints();
});
@ -2642,7 +2649,7 @@ void MainWindow::closeEvent(QCloseEvent *event) {
return;
}
void MainWindow::showEvent(QShowEvent *event)
void MainWindow::showEvent(QShowEvent *)
{
const Settings::UI& settings = pSettings->ui();
ui->tabMessages->setCurrentIndex(settings.bottomPanelIndex());
@ -2841,6 +2848,8 @@ void MainWindow::onCompileFinished(bool isCheckSyntax)
case MainWindow::CompileSuccessionTaskType::Debug:
debug();
break;
default:
break;
}
mCompileSuccessionTask.reset();
// Jump to problem location, sorted by significance
@ -3556,12 +3565,12 @@ void MainWindow::on_splitterMessages_splitterMoved(int, int)
}
void MainWindow::on_EditorTabsLeft_tabBarDoubleClicked(int index)
void MainWindow::on_EditorTabsLeft_tabBarDoubleClicked(int)
{
maximizeEditor();
}
void MainWindow::on_EditorTabsRight_tabBarDoubleClicked(int index)
void MainWindow::on_EditorTabsRight_tabBarDoubleClicked(int)
{
maximizeEditor();
}
@ -4036,7 +4045,7 @@ PSymbolUsageManager &MainWindow::symbolUsageManager()
return mSymbolUsageManager;
}
void MainWindow::on_EditorTabsLeft_currentChanged(int index)
void MainWindow::on_EditorTabsLeft_currentChanged(int)
{
Editor * editor = mEditorList->getEditor(-1,ui->EditorTabsLeft);
if (editor) {
@ -4045,7 +4054,7 @@ void MainWindow::on_EditorTabsLeft_currentChanged(int index)
}
void MainWindow::on_EditorTabsRight_currentChanged(int index)
void MainWindow::on_EditorTabsRight_currentChanged(int)
{
Editor * editor = mEditorList->getEditor(-1,ui->EditorTabsRight);
if (editor) {
@ -4083,7 +4092,7 @@ void MainWindow::on_actionRename_Symbol_triggered()
// mClassBrowserModel.beginUpdate();
QCursor oldCursor = editor->cursor();
editor->setCursor(Qt::CursorShape::WaitCursor);
auto action = finally([this,oldCursor,editor]{
auto action = finally([oldCursor,editor]{
editor->endUpdate();
// mClassBrowserModel.EndTreeUpdate;
editor->setCursor(oldCursor);

View File

@ -896,6 +896,8 @@ QString CppParser::prettyPrintStatement(const PStatement& statement, const QStri
result += statement->fullName; // A::B::C::Bar
result += statement->args; // (int a)
break;
default:
break;
}
}
return result;
@ -927,6 +929,7 @@ int CppParser::getFirstTemplateParamEnd(const QString &s, int startAt)
case ',':
if (level == 1)
return i;
break;
case '>':
level--;
if (level==0)

View File

@ -822,6 +822,8 @@ void CppPreprocessor::parseArgs(PDefine define)
case DefineArgTokenType::Symbol:
formatStr+=token->value;
break;
default:
break;
}
lastTokenType = token->type;
}
@ -941,6 +943,8 @@ QStringList CppPreprocessor::removeComments(const QStringList &text)
case ContentType::RawStringPrefix:
delimiter+=ch;
break;
default:
break;
}
s+=ch;
break;
@ -955,6 +959,8 @@ QStringList CppPreprocessor::removeComments(const QStringList &text)
case ContentType::RawStringPrefix:
delimiter+=ch;
break;
default:
break;
}
s+=ch;
break;
@ -976,6 +982,8 @@ QStringList CppPreprocessor::removeComments(const QStringList &text)
case ContentType::RawStringPrefix:
currentType = ContentType::RawString;
break;
default:
break;
}
s+=ch;
break;

View File

@ -134,7 +134,7 @@ QString CppTokenizer::getForInit()
return "";
}
QString CppTokenizer::getNextToken(bool bSkipParenthesis, bool bSkipArray, bool bSkipBlock)
QString CppTokenizer::getNextToken(bool /* bSkipParenthesis */, bool bSkipArray, bool bSkipBlock)
{
QString result;
bool done = false;

View File

@ -544,6 +544,8 @@ bool Project::saveUnits()
break;
case FileType::WindowsResourceSource:
unit->setFolder("Resources");
default:
break;
}
unit->setNew(false);
ini.SetValue(groupName,"Folder", toByteArray(unit->folder()));
@ -1795,7 +1797,7 @@ int ProjectModel::rowCount(const QModelIndex &parent) const
}
}
int ProjectModel::columnCount(const QModelIndex &parent) const
int ProjectModel::columnCount(const QModelIndex &) const
{
return 1;
}

View File

@ -68,7 +68,7 @@ void FileAssociationModel::updateAssociationStates()
item->selected = checkAssociation(
"."+item->suffix,
"DevCpp."+item->suffix,
item->name,
// item->name,
"Open",
pSettings->dirs().executable()+" \"%1\""
);
@ -131,7 +131,7 @@ void FileAssociationModel::saveAssociations()
bool readRegistry(HKEY key,QByteArray subKey, QString& value) {
DWORD dataSize;
LONG result;
result = RegGetValueA(HKEY_CLASSES_ROOT,subKey,
result = RegGetValueA(key,subKey,
"", RRF_RT_REG_SZ | RRF_RT_REG_MULTI_SZ,
NULL,
NULL,
@ -153,7 +153,7 @@ bool readRegistry(HKEY key,QByteArray subKey, QString& value) {
return true;
}
bool FileAssociationModel::checkAssociation(const QString &extension, const QString &filetype, const QString &description, const QString &verb, const QString &serverApp)
bool FileAssociationModel::checkAssociation(const QString &extension, const QString &filetype, const QString &verb, const QString &serverApp)
{
HKEY key;
LONG result;
@ -264,7 +264,7 @@ bool FileAssociationModel::registerFileType(const QString &filetype, const QStri
return true;
}
int FileAssociationModel::rowCount(const QModelIndex &parent) const
int FileAssociationModel::rowCount(const QModelIndex &) const
{
return mItems.count();
}

View File

@ -29,7 +29,6 @@ signals:
private:
bool checkAssociation(const QString& extension,
const QString& filetype,
const QString& description,
const QString& verb,
const QString& serverApp);
bool registerAssociation(const QString& extension,

View File

@ -51,12 +51,12 @@ void EnvironmentShortcutModel::reload()
endResetModel();
}
int EnvironmentShortcutModel::rowCount(const QModelIndex &parent) const
int EnvironmentShortcutModel::rowCount(const QModelIndex &) const
{
return mShortcuts.count();
}
int EnvironmentShortcutModel::columnCount(const QModelIndex &parent) const
int EnvironmentShortcutModel::columnCount(const QModelIndex &) const
{
return 2;
}

View File

@ -27,7 +27,7 @@ void ProjectDLLHostWidget::doSave()
pMainWindow->project()->options().hostApplication = ui->txtHost->text();
}
void ProjectDLLHostWidget::on_btnBrowse_triggered(QAction *arg1)
void ProjectDLLHostWidget::on_btnBrowse_clicked()
{
QString filename = QFileDialog::getOpenFileName(
this,

View File

@ -24,7 +24,7 @@ protected:
void doLoad() override;
void doSave() override;
private slots:
void on_btnBrowse_triggered(QAction *arg1);
void on_btnBrowse_clicked();
};
#endif // PROJECTDLLHOSTWIDGET_H

View File

@ -220,7 +220,7 @@ void ProjectFilesWidget::init()
}
void ProjectFilesWidget::on_cbEncodingDetail_currentTextChanged(const QString &arg1)
void ProjectFilesWidget::on_cbEncodingDetail_currentTextChanged(const QString &)
{
PProjectUnit unit = currentUnit();
if(!unit)

View File

@ -38,7 +38,7 @@ void ProjectMakefileWidget::doSave()
}
void ProjectMakefileWidget::on_btnBrowse_triggered(QAction *arg1)
void ProjectMakefileWidget::on_btnBrowse_clicked()
{
QString fileName = QFileDialog::getOpenFileName(
this,

View File

@ -26,7 +26,7 @@ protected:
void doLoad() override;
void doSave() override;
private slots:
void on_btnBrowse_triggered(QAction *arg1);
void on_btnBrowse_clicked();
void on_pushButton_clicked();
};

View File

@ -30,7 +30,7 @@ void ProjectPreCompileWidget::doSave()
pMainWindow->project()->saveOptions();
}
void ProjectPreCompileWidget::on_btnBrowse_triggered(QAction *arg1)
void ProjectPreCompileWidget::on_btnBrowse_clicked()
{
QString fileName = QFileDialog::getOpenFileName(
this,

View File

@ -24,7 +24,7 @@ protected:
void doLoad() override;
void doSave() override;
private slots:
void on_btnBrowse_triggered(QAction *arg1);
void on_btnBrowse_clicked();
};
#endif // PROJECTPRECOMPILEWIDGET_H

View File

@ -111,7 +111,7 @@ PTodoItem TodoModel::getItem(const QModelIndex &index)
return mItems[index.row()];
}
int TodoModel::rowCount(const QModelIndex &parent) const
int TodoModel::rowCount(const QModelIndex &) const
{
return mItems.count();
}
@ -153,7 +153,7 @@ QVariant TodoModel::headerData(int section, Qt::Orientation orientation, int rol
return QVariant();
}
int TodoModel::columnCount(const QModelIndex &parent) const
int TodoModel::columnCount(const QModelIndex &) const
{
return 4;
}

View File

@ -71,7 +71,7 @@ const QByteArray GuessTextEncoding(const QByteArray& text){
bool isTextAllAscii(const QByteArray& text) {
for (char c:text) {
if (c<0 || c>127) {
if (c<0) {
return false;
}
}

View File

@ -188,10 +188,12 @@ QVariant ClassBrowserModel::data(const QModelIndex &index, int role) const
return QIcon(":/icons/images/classparser/method_private.ico");
}
}
break;
case StatementKind::skGlobalVariable:
return QIcon(":/icons/images/classparser/global.ico");
case StatementKind::skVariable:
if (statement->scope == StatementScope::ssGlobal)
// if (statement->scope == StatementScope::ssGlobal)
// return QIcon(":/icons/images/classparser/global.ico");
if (statement->isInherited) {
if (statement->classScope == StatementClassScope::scsProtected) {
return QIcon(":/icons/images/classparser/var_inherited_protected.ico");
@ -207,6 +209,9 @@ QVariant ClassBrowserModel::data(const QModelIndex &index, int role) const
return QIcon(":/icons/images/classparser/var_private.ico");
}
}
break;
default:
break;
}
}
@ -272,9 +277,9 @@ void ClassBrowserModel::fillStatements()
});
QString mParserSerialId = mParser->serialId();
if (!mCurrentFile.isEmpty()) {
QSet<QString> includedFiles = mParser->getFileIncludes(mCurrentFile);
// QSet<QString> includedFiles = mParser->getFileIncludes(mCurrentFile);
addMembers(includedFiles);
addMembers();
// Remember selection
// if fLastSelection <> '' then
// ReSelect;
@ -297,7 +302,7 @@ void ClassBrowserModel::addChild(ClassBrowserNode *node, PStatement statement)
filterChildren(newNode.get(), statement->children);
}
void ClassBrowserModel::addMembers(const QSet<QString> &includedFiles)
void ClassBrowserModel::addMembers()
{
// show statements in the file
PFileIncludes p = mParser->findFileIncludes(mCurrentFile);

View File

@ -47,7 +47,7 @@ public slots:
void fillStatements();
private:
void addChild(ClassBrowserNode* node, PStatement statement);
void addMembers(const QSet<QString>& includedFiles);
void addMembers();
void filterChildren(ClassBrowserNode * node, const StatementMap& statements);
PStatement createDummy(PStatement statement);
private:

View File

@ -97,7 +97,7 @@ void CPUDialog::on_rdATT_toggled(bool)
pSettings->debugger().save();
}
void CPUDialog::on_chkBlendMode_stateChanged(int arg1)
void CPUDialog::on_chkBlendMode_stateChanged(int)
{
updateInfo();
pSettings->debugger().setBlendMode(ui->chkBlendMode->isCheckable());

View File

@ -84,9 +84,9 @@ void SearchDialog::findInFiles(const QString &keyword, SearchFileScope scope, Sy
break;
}
// Apply options
ui->chkRegExp->setChecked(mSearchOptions.testFlag(ssoRegExp));
ui->chkCaseSensetive->setChecked(mSearchOptions.testFlag(ssoMatchCase));
ui->chkWholeWord->setChecked(mSearchOptions.testFlag(ssoWholeWord));
ui->chkRegExp->setChecked(options.testFlag(ssoRegExp));
ui->chkCaseSensetive->setChecked(options.testFlag(ssoMatchCase));
ui->chkWholeWord->setChecked(options.testFlag(ssoWholeWord));
show();
}
@ -223,7 +223,7 @@ void SearchDialog::on_btnExecute_clicked()
bool doPrompt = ui->chkPrompt->isChecked();
findCount+=execute(e,ui->cbFind->currentText(),ui->cbReplace->currentText(),
[&doPrompt](const QString& sSearch,
const QString& sReplace, int Line, int ch, int wordLen){
const QString& /*sReplace*/, int /*Line*/, int /*ch*/, int /*wordLen*/){
if (doPrompt) {
switch(QMessageBox::question(pMainWindow,
tr("Replace"),

View File

@ -272,7 +272,7 @@ void SearchResultTreeModel::onResultModelChanged()
endResetModel();
}
Qt::ItemFlags SearchResultTreeModel::flags(const QModelIndex &index) const
Qt::ItemFlags SearchResultTreeModel::flags(const QModelIndex &) const
{
Qt::ItemFlags flags=Qt::ItemIsEnabled | Qt::ItemIsSelectable;
if (mSelectable) {