summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <[email protected]>2017-04-25 23:18:31 +0200
committerAlbert Astals Cid <[email protected]>2017-04-25 23:18:31 +0200
commit03b0da4f8c24530091edcb5f022956fc19af5347 (patch)
treebb5e0fcd691a64df679ff960fea0f725b56b0d27
parenta2688e00de284b3901a9d680984675f311e8ec1a (diff)
No need for a new function, just make the old one public
-rw-r--r--src/map.cpp5
-rw-r--r--src/map.h6
-rw-r--r--src/mapasker.cpp4
3 files changed, 3 insertions, 12 deletions
diff --git a/src/map.cpp b/src/map.cpp
index af84a08..5bb723b 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -232,8 +232,3 @@ bool KGmap::getDivisionCanAsk(const QString &div, division::askMode am) const
{
return getDivision(div) -> canAsk(am);
}
-
-division *KGmap::getDivisionByRgb(QRgb c) const
-{
- return getDivision(c);
-}
diff --git a/src/map.h b/src/map.h
index c6d03e7..675536e 100644
--- a/src/map.h
+++ b/src/map.h
@@ -55,14 +55,10 @@ class KGmap
QString getDivisionToCapitalQuestionPattern() const;
QString getCapitalToDivisionTitle() const;
QString getDivisionToCapitalTitle() const;
- /**
- * Public alternative of getDivision(QRgb c)
- */
- division *getDivisionByRgb(QRgb c) const;
+ division *getDivision(QRgb c) const;
private:
division *getDivision(const QString &divisionName) const;
- division *getDivision(QRgb c) const;
QList<division*> p_divisions;
diff --git a/src/mapasker.cpp b/src/mapasker.cpp
index 96f93df..e3f256a 100644
--- a/src/mapasker.cpp
+++ b/src/mapasker.cpp
@@ -173,11 +173,11 @@ void mapAsker::handleMapClick(QRgb c, const QPoint &p)
{
int i = p_shuffledColormap.indexOf(vColorRgb);
origColor = p_originalColormap[i];
- vDivision = p_map->getDivisionByRgb(origColor);
+ vDivision = p_map->getDivision(origColor);
}
else
{
- vDivision = p_map->getDivisionByRgb(vColorRgb);
+ vDivision = p_map->getDivision(vColorRgb);
}
vDivisionName = i18nc(p_map -> getFileName().toUtf8(), vDivision->getName().toUtf8());
vAnswer.append(vDivisionName);