summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alphabetparameters.cpp4
-rw-r--r--quacker/bagdisplay.h2
-rw-r--r--quacker/graphicalboard.cpp8
-rw-r--r--quacker/lister.cpp4
-rw-r--r--quacker/lister.h2
-rw-r--r--quacker/newgame.cpp6
-rw-r--r--quacker/newgame.h2
-rw-r--r--quacker/simviewer.cpp7
-rw-r--r--quacker/simviewer.h2
-rw-r--r--quackleio/dict.cpp2
10 files changed, 16 insertions, 23 deletions
diff --git a/alphabetparameters.cpp b/alphabetparameters.cpp
index 9261282..2a7d94f 100644
--- a/alphabetparameters.cpp
+++ b/alphabetparameters.cpp
@@ -90,7 +90,7 @@ void String::counts(const LetterString &letterString, char *countsArray)
const LetterString::const_iterator end(letterString.end());
for (LetterString::const_iterator it = letterString.begin(); it != end; ++it)
- countsArray[*it]++;
+ countsArray[(int)*it]++;
}
void String::counts(const LongLetterString &letterString, char *countsArray)
@@ -100,7 +100,7 @@ void String::counts(const LongLetterString &letterString, char *countsArray)
const LongLetterString::const_iterator end(letterString.end());
for (LongLetterString::const_iterator it = letterString.begin(); it != end; ++it)
- countsArray[*it]++;
+ countsArray[(int)*it]++;
}
////////////
diff --git a/quacker/bagdisplay.h b/quacker/bagdisplay.h
index dbc0c3f..257da8b 100644
--- a/quacker/bagdisplay.h
+++ b/quacker/bagdisplay.h
@@ -21,7 +21,7 @@
#ifndef QUACKER_BAGDISPLAY_H
#define QUACKER_BAGDISPLAY_H
-#include <alphabetparameters.h>
+#include "alphabetparameters.h"
#include "view.h"
class QLabel;
diff --git a/quacker/graphicalboard.cpp b/quacker/graphicalboard.cpp
index 05ed86b..e630e63 100644
--- a/quacker/graphicalboard.cpp
+++ b/quacker/graphicalboard.cpp
@@ -1223,15 +1223,15 @@ QString TileWidget::letterText()
else
return QuackleIO::Util::sanitizeUserVisibleLetterString(QuackleIO::Util::letterToQString(m_information.letter));
+#ifdef FORCE_SECONDARY_ARROW_GLYPHS
+ QChar macSecondaryGlyphs[] = {QChar(0x2192), QChar(0x2193), QChar(0x2606)}; // single arrows, white star
+ return QString(macSecondaryGlyphs[glyphIndex]);
+#else
QChar preferredGlyphs[] = {QChar(0x21d2), QChar(0x21d3), QChar(0x2606)}; // double arrows, white star
QChar secondaryGlyphs[] = {QChar(0x2192), QChar(0x2193), QChar( '*')}; // single arrows, ASCII star
QChar asciiGlyphs[] = {QChar( '>'), QChar( 'v'), QChar( '*')}; // 7-bit
QFontMetrics metrics(letterFont());
-#ifdef FORCE_SECONDARY_ARROW_GLYPHS
- QChar macSecondaryGlyphs[] = {QChar(0x2192), QChar(0x2193), QChar(0x2606)}; // single arrows, white star
- return QString(macSecondaryGlyphs[glyphIndex]);
-#else
if (metrics.inFont(preferredGlyphs[0]) &&
metrics.inFont(preferredGlyphs[1]) &&
metrics.inFont(preferredGlyphs[2]))
diff --git a/quacker/lister.cpp b/quacker/lister.cpp
index 55941a8..f36cd9d 100644
--- a/quacker/lister.cpp
+++ b/quacker/lister.cpp
@@ -147,7 +147,7 @@ ListerDialog::ListerDialog(QWidget *parent, const QString &settingsGroup, const
connect(m_writeButton, SIGNAL(clicked()), this, SLOT(writeButtonClicked()));
connect(m_writeNormalButton, SIGNAL(clicked()), this, SLOT(writeNormalButtonClicked()));
connect(m_studyThisButton, SIGNAL(clicked()), this, SLOT(studyButtonClicked()));
- connect(m_closeButton, SIGNAL(clicked()), this, SLOT(done()));
+ connect(m_closeButton, SIGNAL(clicked()), this, SLOT(accept()));
connect(clearButton, SIGNAL(clicked()), this, SLOT(clear()));
connect(openButton, SIGNAL(clicked()), this, SLOT(openFile()));
@@ -309,7 +309,7 @@ void ListerDialog::showFilter(QListWidgetItem *item)
showFilter(item->text());
}
-void ListerDialog::done()
+void ListerDialog::accept()
{
saveSettings();
resetFocus();
diff --git a/quacker/lister.h b/quacker/lister.h
index 60ba784..e7aa1c2 100644
--- a/quacker/lister.h
+++ b/quacker/lister.h
@@ -85,7 +85,7 @@ public slots:
QString windowTitleWithAppName(const QString &windowTitle);
- void done();
+ void accept();
protected:
Dict::WordList m_wordList;
diff --git a/quacker/newgame.cpp b/quacker/newgame.cpp
index 97ef15d..c0de5f5 100644
--- a/quacker/newgame.cpp
+++ b/quacker/newgame.cpp
@@ -40,7 +40,7 @@ NewGameDialog::NewGameDialog(QWidget *parent)
QPushButton *okButton = new QPushButton(tr("&OK"));
QPushButton *cancelButton = new QPushButton(tr("&Cancel"));
- connect(okButton, SIGNAL(clicked()), this, SLOT(done()));
+ connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
QHBoxLayout *buttonLayout = new QHBoxLayout;
@@ -64,10 +64,10 @@ Quackle::PlayerList NewGameDialog::players() const
return m_playerTab->players();
}
-void NewGameDialog::done()
+void NewGameDialog::accept()
{
saveSettings();
- accept();
+ QDialog::accept();
}
void NewGameDialog::saveSettings()
diff --git a/quacker/newgame.h b/quacker/newgame.h
index 9b3be5f..283c8e8 100644
--- a/quacker/newgame.h
+++ b/quacker/newgame.h
@@ -52,7 +52,7 @@ public:
Quackle::PlayerList players() const;
public slots:
- void done();
+ void accept();
protected:
void saveSettings();
diff --git a/quacker/simviewer.cpp b/quacker/simviewer.cpp
index 359dc4a..ab82382 100644
--- a/quacker/simviewer.cpp
+++ b/quacker/simviewer.cpp
@@ -37,7 +37,7 @@ SimViewer::SimViewer(QWidget *parent)
QPushButton *closeButton = new QPushButton(tr("&Close"));
closeButton->setDefault(true);
- connect(closeButton, SIGNAL(clicked()), this, SLOT(done()));
+ connect(closeButton, SIGNAL(clicked()), this, SLOT(accept()));
QHBoxLayout *buttonLayout = new QHBoxLayout;
buttonLayout->addStretch(1);
@@ -57,11 +57,6 @@ void SimViewer::setSimulator(const Quackle::Simulator &simulator)
setWindowTitle(tr("%1 iterations of %2 - Quackle").arg(simulator.iterations()).arg(QuackleIO::Util::letterStringToQString(simulator.currentPosition().currentPlayer().rack().tiles())));
}
-void SimViewer::done()
-{
- accept();
-}
-
/////////////
AveragesTab::AveragesTab(QWidget *parent)
diff --git a/quacker/simviewer.h b/quacker/simviewer.h
index d419ee8..5843b6a 100644
--- a/quacker/simviewer.h
+++ b/quacker/simviewer.h
@@ -42,8 +42,6 @@ public:
public slots:
void setSimulator(const Quackle::Simulator &simulator);
- void done();
-
private:
QTabWidget *m_tabs;
AveragesTab *m_averagesTab;
diff --git a/quackleio/dict.cpp b/quackleio/dict.cpp
index 8a59a76..5bb76c2 100644
--- a/quackleio/dict.cpp
+++ b/quackleio/dict.cpp
@@ -85,7 +85,7 @@ ExtensionList Word::extensionsByLength(int length, const ExtensionList &list)
for (ExtensionList::const_iterator it = list.begin(); it != list.end(); ++it)
{
- if ((*it).extensionLetterString.length() == length)
+ if ((*it).extensionLetterString.length() == (unsigned)length)
{
Extension extension(*it);
extension.word = QuackleIO::Util::letterStringToQString((*it).extensionLetterString);