projects
/
ptas
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Works now without any existing location settings, enabling a new user to start using it.
[ptas]
/
zouba
/
location.cpp
diff --git
a/zouba/location.cpp
b/zouba/location.cpp
index
3b289ca
..
4a4a1a7
100644
(file)
--- a/
zouba/location.cpp
+++ b/
zouba/location.cpp
@@
-33,6
+33,7
@@
Location::Location( const QString &x, const QString &y, const QString &label ) :
q( new LocationPrivate( x, y, label ) ),
manager( new QNetworkAccessManager(this) )
{
q( new LocationPrivate( x, y, label ) ),
manager( new QNetworkAccessManager(this) )
{
+ qDebug() << "Location::Location(" << x << "," << y << "," << label <<")";
connect(
manager, SIGNAL( finished(QNetworkReply*) ),
this, SLOT( replyFinished(QNetworkReply*) )
connect(
manager, SIGNAL( finished(QNetworkReply*) ),
this, SLOT( replyFinished(QNetworkReply*) )
@@
-109,6
+110,7
@@
void Location::resolveAddress( const QString &address )
qDebug() << address;
q->setAddress( address );
qDebug() << address;
q->setAddress( address );
+ q->setValid( false );
QUrl fullUrl( Ytv::Url );
QUrl fullUrl( Ytv::Url );
@@
-126,7
+128,7
@@
void Location::replyFinished( QNetworkReply * reply )
q->parseReply( reply->readAll() );
if ( isValid() ) {
q->parseReply( reply->readAll() );
if ( isValid() ) {
- qDebug() << label() << "becomeValid" << this;
+ qDebug() << label() << "becomeValid";
emit( becomeValid() );
}
}
emit( becomeValid() );
}
}
@@
-153,6
+155,7
@@
QString Location::label() const
void Location::setAddress( const QString &address ) const
{
void Location::setAddress( const QString &address ) const
{
+ qDebug() << "setting address to" << address;
q->setAddress( address );
}
q->setAddress( address );
}
@@
-166,7
+169,6
@@
bool Location::isValid() const
return q->isValid();
}
return q->isValid();
}
-
// Degrees to radians
double Location::radians(double deg)
{
// Degrees to radians
double Location::radians(double deg)
{