aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Paul-Erik Törrönen <poltsi@777-team.org>2015-05-16 00:27:08 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-05-21 16:05:09 -0700
commitcfa54031928e901f56fd2c6b90047833d5a59c02 (patch)
tree50a4c00cd291540899a317459219a2c83d6887d6
parent00b1469658fc43ec6448cd01e59405bfeeef40cb (diff)
downloadsubsurface-cfa54031928e901f56fd2c6b90047833d5a59c02.tar.gz
Fix typo
Loockup -> Lookup Signed-off-by: Paul-Erik Törrönen <poltsi@777-team.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--divesitehelpers.cpp22
-rw-r--r--divesitehelpers.h6
-rw-r--r--parse-xml.c4
-rw-r--r--qt-ui/maintab.cpp4
-rw-r--r--qt-ui/maintab.h4
-rw-r--r--qt-ui/mainwindow.cpp8
6 files changed, 24 insertions, 24 deletions
diff --git a/divesitehelpers.cpp b/divesitehelpers.cpp
index cc45851f3..8564ce2dc 100644
--- a/divesitehelpers.cpp
+++ b/divesitehelpers.cpp
@@ -17,25 +17,25 @@
#include <QUrlQuery>
#include <QEventLoop>
-struct GeoLoockupInfo {
+struct GeoLookupInfo {
degrees_t lat;
degrees_t lon;
uint32_t uuid;
};
-QVector<GeoLoockupInfo> geo_loockup_data;
+QVector<GeoLookupInfo> geo_lookup_data;
-ReverseGeoLoockupThread* ReverseGeoLoockupThread::instance() {
- static ReverseGeoLoockupThread* self = new ReverseGeoLoockupThread();
+ReverseGeoLookupThread* ReverseGeoLookupThread::instance() {
+ static ReverseGeoLookupThread* self = new ReverseGeoLookupThread();
return self;
}
-ReverseGeoLoockupThread::ReverseGeoLoockupThread(QObject *obj) : QThread(obj)
+ReverseGeoLookupThread::ReverseGeoLookupThread(QObject *obj) : QThread(obj)
{
}
-void ReverseGeoLoockupThread::run() {
- if (geo_loockup_data.isEmpty())
+void ReverseGeoLookupThread::run() {
+ if (geo_lookup_data.isEmpty())
return;
QNetworkRequest request;
@@ -44,7 +44,7 @@ void ReverseGeoLoockupThread::run() {
request.setRawHeader("User-Agent", getUserAgent().toUtf8());
QEventLoop loop;
QString apiCall("http://open.mapquestapi.com/nominatim/v1/reverse.php?format=json&accept-language=%1&lat=%2&lon=%3");
- Q_FOREACH (const GeoLoockupInfo& info, geo_loockup_data ) {
+ Q_FOREACH (const GeoLookupInfo& info, geo_lookup_data ) {
request.setUrl(apiCall.arg(uiLanguage(NULL)).arg(info.lat.udeg / 1000000.0).arg(info.lon.udeg / 1000000.0));
QNetworkReply *reply = rgl->get(request);
QObject::connect(reply, SIGNAL(finished()), &loop, SLOT(quit()));
@@ -66,11 +66,11 @@ void ReverseGeoLoockupThread::run() {
rgl->deleteLater();
}
-extern "C" void add_geo_information_for_loockup(degrees_t latitude, degrees_t longitude, uint32_t uuid) {
- GeoLoockupInfo info;
+extern "C" void add_geo_information_for_lookup(degrees_t latitude, degrees_t longitude, uint32_t uuid) {
+ GeoLookupInfo info;
info.lat = latitude;
info.lon = longitude;
info.uuid = uuid;
- geo_loockup_data.append(info);
+ geo_lookup_data.append(info);
}
diff --git a/divesitehelpers.h b/divesitehelpers.h
index 68c195674..dad60be36 100644
--- a/divesitehelpers.h
+++ b/divesitehelpers.h
@@ -4,14 +4,14 @@
#include "units.h"
#include <QThread>
-class ReverseGeoLoockupThread : public QThread {
+class ReverseGeoLookupThread : public QThread {
Q_OBJECT
public:
- static ReverseGeoLoockupThread *instance();
+ static ReverseGeoLookupThread *instance();
void run() Q_DECL_OVERRIDE;
private:
- ReverseGeoLoockupThread(QObject *parent = 0);
+ ReverseGeoLookupThread(QObject *parent = 0);
};
#endif // DIVESITEHELPERS_H
diff --git a/parse-xml.c b/parse-xml.c
index c5ed21a54..51d23ec10 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -1167,7 +1167,7 @@ static void gps_location(char *buffer, struct dive_site *ds)
/* this is in qthelper.cpp, so including the .h file is a pain */
extern const char *printGPSCoords(int lat, int lon);
-extern void add_geo_information_for_loockup(degrees_t latitude, degrees_t longitude, uint32_t uuid);
+extern void add_geo_information_for_lookup(degrees_t latitude, degrees_t longitude, uint32_t uuid);
static void gps_in_dive(char *buffer, struct dive *dive)
{
@@ -1206,7 +1206,7 @@ static void gps_in_dive(char *buffer, struct dive *dive)
}
}
if (ds && (!ds->notes || strstr(ds->notes, "countrytag:") == NULL))
- add_geo_information_for_loockup(latitude, longitude, dive->dive_site_uuid);
+ add_geo_information_for_lookup(latitude, longitude, dive->dive_site_uuid);
}
static void add_dive_site(char *buffer, struct dive *dive)
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index fd760445b..88bcc83e6 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -209,13 +209,13 @@ MainTab::~MainTab()
}
}
-void MainTab::enableGeoLoockupEdition()
+void MainTab::enableGeoLookupEdition()
{
ui.waitingSpinner->stop();
ui.manageDiveSite->show();
}
-void MainTab::disableGeoLoockupEdition()
+void MainTab::disableGeoLookupEdition()
{
ui.waitingSpinner->start();
ui.manageDiveSite->hide();
diff --git a/qt-ui/maintab.h b/qt-ui/maintab.h
index 4a44c03b3..d8880f584 100644
--- a/qt-ui/maintab.h
+++ b/qt-ui/maintab.h
@@ -94,8 +94,8 @@ slots:
void removeSelectedPhotos();
void prepareDiveSiteEdit();
void showLocation();
- void enableGeoLoockupEdition();
- void disableGeoLoockupEdition();
+ void enableGeoLookupEdition();
+ void disableGeoLookupEdition();
private:
Ui::MainTab ui;
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index a06a2c227..1557e0fcc 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -202,9 +202,9 @@ MainWindow::MainWindow() : QMainWindow(),
undoRedoActions.append(redoAction);
ui.menu_Edit->addActions(undoRedoActions);
- ReverseGeoLoockupThread *geoLoockup = ReverseGeoLoockupThread::instance();
- connect(geoLoockup, SIGNAL(started()),information(), SLOT(disableGeoLoockupEdition()));
- connect(geoLoockup, SIGNAL(finished()), information(), SLOT(enableGeoLoockupEdition()));
+ ReverseGeoLookupThread *geoLookup = ReverseGeoLookupThread::instance();
+ connect(geoLookup, SIGNAL(started()),information(), SLOT(disableGeoLookupEdition()));
+ connect(geoLookup, SIGNAL(finished()), information(), SLOT(enableGeoLookupEdition()));
}
MainWindow::~MainWindow()
@@ -1460,7 +1460,7 @@ void MainWindow::loadFiles(const QStringList fileNames)
// searches for geo lookup information in a thread so it doesn`t
// freezes the ui.
- ReverseGeoLoockupThread::instance()->start();
+ ReverseGeoLookupThread::instance()->start();
refreshDisplay();
ui.actionAutoGroup->setChecked(autogroup);