Skip to content

Commit

Permalink
Fixes warnings (replaces 0 or NULL by nullptr, etc.)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpina committed May 9, 2020
1 parent 47d9e59 commit d0072fc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gui/AuxiliarGUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "CMakeOptions.h"

void *AuxiliarGUI::m=0;
void *AuxiliarGUI::m=nullptr;

QString AuxiliarGUI::version = QDACCO_VERSION;
QString AuxiliarGUI::copyright_date = "2005, 2006, 2007, 2008, 2009, 2011, 2013, 2015, 2017, 2020";
Expand Down
2 changes: 1 addition & 1 deletion gui/about.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class About : public QDialog
{
Q_OBJECT
public:
About(QWidget *parent = 0);
About(QWidget *parent = nullptr);

private:
Ui::About ui;
Expand Down
2 changes: 1 addition & 1 deletion gui/configure.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Configure : public QDialog
{
Q_OBJECT
public:
Configure(QWidget *parent = 0);
Configure(QWidget *parent = nullptr);

private:
Ui::Configure ui;
Expand Down
10 changes: 5 additions & 5 deletions gui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ bool Main::eventFilter(QObject *, QEvent *event) //obj
type!=QEvent::User+Auxiliar::KeyUp() &&
type!=QEvent::User+Auxiliar::KeyNextPage() &&
type!=QEvent::User+Auxiliar::KeyPrevPage()) {
return NULL;
return false;
}

if (ui.llistat->isVisible()) {
Expand All @@ -268,7 +268,7 @@ void Main::buscarEnter()
if (ui.llistat->isVisible()) {
QListWidgetItem *item;
item = ui.llistat->currentItem();
if (item!=NULL) {
if (item!=nullptr) {
ui.paraula->setText(item->text());
}
}
Expand Down Expand Up @@ -332,7 +332,7 @@ void Main::UpdateList() {
handler.setIgnoreAccents(m_IgnoreAccents);

AuxiliarGUI::m=this;
void (*ptrFunction)(QString)=NULL;
void (*ptrFunction)(QString)=nullptr;
ptrFunction = lib2class;

handler.setAddFunction(ptrFunction);
Expand Down Expand Up @@ -496,7 +496,6 @@ void Main::posarApunt (int all) {
}

int Main::isValidWord(QString &q) {
QChar first;
//We transform the word to not-capital
//We check that first letter is a letter
//We delete space before word
Expand Down Expand Up @@ -533,7 +532,7 @@ void Main::selectItem()

item = ui.llistat->item(0);

if (item!=NULL) {
if (item!=nullptr) {
if (item->text().compare(m_searched)==0) {
ui.llistat->setCurrentRow(0);
}
Expand Down Expand Up @@ -698,5 +697,6 @@ void Main::restaura() {
}

void Main::quit() {
// This is not the usual way to exit a Qt application!
exit(0);
}
2 changes: 1 addition & 1 deletion gui/textbrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class TextBrowser : public QTextBrowser
}

public:
TextBrowser(QWidget *&) {};
TextBrowser(QWidget *&) {}

void setFather(QMainWindow *m) {
m_parent=m;
Expand Down

0 comments on commit d0072fc

Please sign in to comment.