diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index eb7237c3bb6..c7f603baaa1 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -1872,15 +1872,6 @@ bool QgisApp::addLayer(QFileInfo const & vectorFile) // Register this layer with the layers registry QgsMapLayerRegistry::instance()->addMapLayer(layer); - // connect up any keypresses to be passed tot he layer (e.g. so esc can stop rendering) -#ifdef QGISDEBUG - std::cout << " Connecting up maplayers keyPressed event to the QgisApp keyPress signal" << std::endl; -#endif - QObject::connect(this, - SIGNAL(keyPressed(QKeyEvent *)), - layer, - SLOT(keyPressed(QKeyEvent* ))); - } else { @@ -1963,14 +1954,6 @@ bool QgisApp::addLayer(QStringList const &theLayerQStringList, const QString& en // Register this layer with the layers registry QgsMapLayerRegistry::instance()->addMapLayer(layer); - // connect up any keypresses to be passed tot he layer (e.g. so esc can stop rendering) -#ifdef QGISDEBUG - std::cout << " Connecting up maplayers keyPressed event to the QgisApp keyPress signal" << std::endl; -#endif - QObject::connect(this, - SIGNAL(keyPressed(QKeyEvent *)), - layer, - SLOT(keyPressed(QKeyEvent* ))); } else { @@ -2062,14 +2045,6 @@ void QgisApp::addDatabaseLayer() // register this layer with the central layers registry QgsMapLayerRegistry::instance()->addMapLayer(layer); - // connect up any keypresses to be passed tot he layer (e.g. so esc can stop rendering) -#ifdef QGISDEBUG - std::cout << " Connecting up maplayers keyPressed event to the QgisApp keyPress signal" << std::endl; -#endif - QObject::connect(this, - SIGNAL(keyPressed(QKeyEvent *)), - layer, - SLOT(keyPressed(QKeyEvent* ))); } else { @@ -4275,15 +4250,6 @@ void QgisApp::addVectorLayer(QString vectorLayerPath, QString baseName, QString // Register this layer with the layers registry QgsMapLayerRegistry::instance()->addMapLayer(layer); - // connect up any keypresses to be passed tot he layer (e.g. so esc can stop rendering) -#ifdef QGISDEBUG - std::cout << " Connecting up maplayers keyPressed event to the QgisApp keyPress signal" << std::endl; -#endif - QObject::connect(this, - SIGNAL(keyPressed(QKeyEvent * )), - layer, - SLOT(keyPressed(QKeyEvent* ))); - QgsProject::instance()->dirty(false); // XXX this might be redundant statusBar()->message(mMapCanvas->extent().stringRep(2)); @@ -4947,14 +4913,6 @@ bool QgisApp::addRasterLayer(QgsRasterLayer * theRasterLayer, bool theForceRedra SIGNAL(setStatus(QString)), this, SLOT(showStatusMessage(QString))); - // connect up any keypresses to be passed tot he layer (e.g. so esc can stop rendering) -#ifdef QGISDEBUG - std::cout << " Connecting up maplayers keyPressed event to the QgisApp keyPress signal" << std::endl; -#endif - QObject::connect(this , - SIGNAL(keyPressed(QKeyEvent * )), - theRasterLayer, - SLOT(keyPressed(QKeyEvent* ))); // add it to the mapcanvas collection // no longer necessary since adding to registry automatically adds to canvas @@ -5099,15 +5057,6 @@ void QgisApp::addRasterLayer(QString const & rasterLayerPath, this, SLOT(showStatusMessage(QString))); - // connect up any keypresses to be passed tot he layer (e.g. so esc can stop rendering) -#ifdef QGISDEBUG - std::cout << " Connecting up maplayers keyPressed event to the QgisApp keyPress signal" << std::endl; -#endif - QObject::connect(this, - SIGNAL(keyPressed(QKeyEvent * )), - layer, - SLOT(keyPressed(QKeyEvent* ))); - QgsProject::instance()->dirty(false); // XXX this might be redundant statusBar()->message(mMapCanvas->extent().stringRep(2)); diff --git a/src/core/qgsmaplayer.h b/src/core/qgsmaplayer.h index a6fed900ca4..950b9cb22ba 100644 --- a/src/core/qgsmaplayer.h +++ b/src/core/qgsmaplayer.h @@ -222,9 +222,6 @@ public slots: void setScaleBasedVisibility( bool theVisibilityFlag); bool scaleBasedVisibility(); - /** Layer can be informed when a key is pressed. */ - virtual void keyPressed (QKeyEvent *e) {}; - signals: /** Emit a signal to notify of a progress event */