Skip to content

Instantly share code, notes, and snippets.

View mbernasocchi's full-sized avatar
🎯
Focusing

Marco Bernasocchi mbernasocchi

🎯
Focusing
View GitHub Profile
@mbernasocchi
mbernasocchi / gist:1632500
Created January 18, 2012 11:18
qtlocation example
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui(new Ui::MainWindow)
{
ui->setupUi(this);
location = new LocationWatcher();
if (location->source)
{
connect(location->source, SIGNAL(positionUpdated(QGeoPositionInfo)),
this, SLOT(positionUpdated(QGeoPositionInfo)));
@mbernasocchi
mbernasocchi / gist:1633060
Created January 18, 2012 13:43
parseData
void QgsQtLocationConnection::parseData()
{
QgsDebugMsg( "parsing!" );
mStatus = GPSDataReceived;
if (source){
QGeoPositionInfo info = source->lastKnownPosition();
if (info.isValid())
{
QgsDebugMsg( "Valid QGeoPositionInfo!" );
@mbernasocchi
mbernasocchi / gist:1670928
Created January 24, 2012 16:20
qgsvectordataprovider error
D/Qt ( 3420): src/app/qgsnewspatialitelayerdialog.cpp: 365: (apply) Creating table in database /data/data/org.qgis.qgis/files/sqlite.db
D/Qt ( 3420): src/app/qgsnewspatialitelayerdialog.cpp: 367: (apply) create table "GPSLINES"(pkuid integer primary key autoincrement,"time" text)
D/Qt ( 3420): src/app/qgsnewspatialitelayerdialog.cpp: 374: (apply) select AddGeometryColumn('GPSLINES','geometry',3452,'LINESTRING',2)
D/Qt ( 3420): src/app/qgsnewspatialitelayerdialog.cpp: 379: (apply) select CreateSpatialIndex('GPSLINES','geometry')
D/Qt ( 3420): src/core/qgsmaplayer.cpp: 53: (QgsMapLayer) lyrname is 'GPSLINES'
D/Qt ( 3420): src/core/qgsmaplayer.cpp: 59: (QgsMapLayer) layerName is 'GPSLINES'
D/Qt ( 3420): src/core/qgsproviderregistry.cpp: 364: (provider) Library name is /data/data/org.qgis.qgis/lib/libspatialiteprovider.so
D/Qt ( 3420): src/core/qgsproviderregistry.cpp: 370: (provider) Loaded data provider library
D/Qt ( 3420): src/core/qgsproviderregistry.cpp: 371: (pr
@mbernasocchi
mbernasocchi / gist:1788922
Created February 10, 2012 11:31
initial longClick support
From 7e7aa7438bee2b427eeee8ddeeec6406193842dc Mon Sep 17 00:00:00 2001
From: Marco Bernasocchi <[email protected]>
Date: Thu, 9 Feb 2012 15:05:47 +0100
Subject: [PATCH] initial right click support
diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp
index 19561b1..5c04f77 100644
--- a/src/app/qgisapp.cpp
+++ b/src/app/qgisapp.cpp
@mbernasocchi
mbernasocchi / gist:1792553
Created February 10, 2012 20:30
logcat of qgis on android gps
D/Qt (18736): QGeoPositionInfo(QDateTime("Fri Feb 10 21:28:11 2012") , QGeoCoordinate(46.7899, 9.2529, 836), Direction=0, GroundSpeed=0, MagneticVariation=1.72637, HorizontalAccuracy=45, VerticalAccuracy=45)
D/Qt (18736): src/core/gps/qgsqtlocationconnection.cpp: 96: (parseData) Valid QGeoPositionInfo, positionUpdated
D/Qt (18736): src/core/qgscoordinatetransform.cpp: 585: (transformCoords) Projection failed emitting invalid transform signal: forward transform of
D/Qt (18736): (12887.948610, 3203.275507)
D/Qt (18736): PROJ.4: +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs +to +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +units=m +no_defs
D/Qt (18736): Error: latitude or longitude exceeded limits
D/Qt (18736): src/core/qgscoordinatetransform.cpp: 589: (transformCoords) throwing exception
D/Qt (18736): src/core/qgscoordinatetransform.cpp: 237: (transform) rethrowing exception
D/Qt (18736): cre
#########postgresql-9.0.4########
echo "postgresql"
cd $SRC_DIR/postgresql-9.0.4
#building in an other dir seems not to work
mkdir -p build-$ANDROID_TARGET_ARCH
cd build-$ANDROID_TARGET_ARCH
#no ssl
CFLAGS="$MY_STD_CFLAGS" \
CXXFLAGS="$MY_STD_CFLAGS" \
LDFLAGS="$MY_STD_LDFLAGS" \
src/core/qgsmaplayer.cpp: 53: (QgsMapLayer) lyrname is 'Brasil_Cap'
src/core/qgsmaplayer.cpp: 59: (QgsMapLayer) layerName is 'Brasil_Cap'
src/core/qgsproviderregistry.cpp: 364: (provider) Library name is /home/marco/dev/Quantum-GIS/build/output/bin/../lib/qgis/plugins/libmemoryprovider.so
src/core/qgsproviderregistry.cpp: 370: (provider) Loaded data provider library
src/core/qgsproviderregistry.cpp: 371: (provider) Attempting to resolve the classFactory function
src/core/qgsproviderregistry.cpp: 378: (provider) Getting pointer to a dataProvider object from the library
src/core/qgsproviderregistry.cpp: 389: (provider) Instantiated the data provider plugin
src/core/qgsproviderregistry.cpp: 390: (provider) provider name: memory
src/core/qgsproviderregistry.cpp: 401: (provider) Invalid data provider
src/core/qgsvectorlayer.cpp: 2860: (setDataProvider) unable to get data provider
[ 184.413746] usb 2-1: new full-speed USB device number 3 using xhci_hcd
[ 185.499513] usb 2-1: usbfs: USBDEVFS_CONTROL failed cmd mtp-probe rqt 128 rq 6 len 1024 ret -110
[ 212.182223] usbcore: registered new interface driver usbserial
[ 212.182237] USB Serial support registered for generic
[ 212.182360] usbcore: registered new interface driver usbserial_generic
[ 212.182368] usbserial: USB Serial Driver core
[ 212.184470] USB Serial support registered for Garmin GPS usb/tty
[ 212.184515] garmin_gps 2-1:1.0: Garmin GPS usb/tty converter detected
[ 212.184637] usb 2-1: Garmin GPS usb/tty converter now attached to ttyUSB0
[ 212.184654] usbcore: registered new interface driver garmin_gps
#!/bin/bash
# ***************************************************************************
# build-apk.sh - builds the and installs the needed libraries for android QGIS
# --------------------------------------
# Date : 01-Aug-2011
# Copyright : (C) 2011 by Marco Bernasocchi
# Email : marco at bernawebdesign.ch
# ***************************************************************************
# * *
@mbernasocchi
mbernasocchi / add_user_pending_email.diff
Created August 15, 2012 14:15
add_user_pending_email.diff
diff --git a/modules/custom-email/admin/custom-email-admin.php b/modules/custom-email/admin/custom-email-admin.php
index c0c42dc..404969b 100644
--- a/modules/custom-email/admin/custom-email-admin.php
+++ b/modules/custom-email/admin/custom-email-admin.php
@@ -249,6 +249,49 @@ class Theme_My_Login_Custom_Email_Admin extends Theme_My_Login_Module {
}
/**
+ * Outputs user pending e-mail settings
+ *