Commit 07faf3dd authored by Jan Möbius's avatar Jan Möbius
Browse files

Delete variables after using them

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5962 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b04dee26
<?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE KDevPrjSession>
<KDevPrjSession>
<DocsAndViews NumberOfDocuments="9" >
<Doc0 NumberOfViews="1" URL="file:///data/home2/wilden/projects/OpenFlipper/Plugin-TextureControl/TextureControl.cc" >
<View0 Encoding="" line="1187" Type="Source" />
<DocsAndViews NumberOfDocuments="1" >
<Doc0 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/Plugin-Scissor/ScissorPlugin.hh" >
<View0 Encoding="" line="56" Type="Source" />
</Doc0>
<Doc1 NumberOfViews="1" URL="file:///data/home2/wilden/projects/OpenFlipper/Plugin-TextureControl/TextureControl.hh" >
<View0 Encoding="" line="0" Type="Source" />
</Doc1>
<Doc2 NumberOfViews="1" URL="file:///data/home2/wilden/projects/OpenFlipper/Plugin-TextureControl/textureProperties.cc" >
<View0 Encoding="" line="197" Type="Source" />
</Doc2>
<Doc3 NumberOfViews="1" URL="file:///data/home2/wilden/projects/OpenFlipper/Plugin-TextureControl/textureProperties.hh" >
<View0 Encoding="" line="73" Type="Source" />
</Doc3>
<Doc4 NumberOfViews="1" URL="file:///data/home2/wilden/projects/OpenFlipper/Plugin-TextureControl/QwtFunctionPlot.cc" >
<View0 Encoding="" line="106" Type="Source" />
</Doc4>
<Doc5 NumberOfViews="1" URL="file:///data/home2/wilden/projects/OpenFlipper/Plugin-TextureControl/QwtFunctionPlot.hh" >
<View0 Encoding="" line="64" Type="Source" />
</Doc5>
<Doc6 NumberOfViews="1" URL="file:///data/home2/wilden/projects/OpenFlipper/Plugin-TextureControl/HistogramItem.hh" >
<View0 Encoding="" line="30" Type="Source" />
</Doc6>
<Doc7 NumberOfViews="1" URL="file:///data/home2/wilden/projects/OpenFlipper/Plugin-TextureControl/HistogramItem.cc" >
<View0 Encoding="" line="78" Type="Source" />
</Doc7>
<Doc8 NumberOfViews="1" URL="file:///data/home2/wilden/projects/OpenFlipper/OpenFlipper/BasePlugin/TextureInterface.hh" >
<View0 Encoding="" line="136" Type="Source" />
</Doc8>
</DocsAndViews>
<pluginList>
<kdevdebugger>
......
......@@ -59,7 +59,10 @@ void CoreWidget::keyPressEvent(QKeyEvent* _e)
return;
}
//the key was specified through keyInterface
// =================================================================================
// Map event to the cores key and modifier.
// Call the core key handler with the mapped event.
// =================================================================================
QKeyEvent* mappedEvent = new QKeyEvent(_e->type(),binding.key, binding.modifiers,
_e->text(), _e->isAutoRepeat(), _e->count() );
......@@ -87,9 +90,17 @@ void CoreWidget::keyPressEvent(QKeyEvent* _e)
KeyInterface* keyPlugin = qobject_cast< KeyInterface * >(plugin);
if (keyPlugin){
// =================================================================================
// Map event to the plugins key and modifier.
// Call it with the mapped event.
// =================================================================================
QKeyEvent* mappedEvent = new QKeyEvent(_e->type(),binding.key, binding.modifiers,
_e->text(), _e->isAutoRepeat(), _e->count() );
keyPlugin->slotKeyEvent(mappedEvent);
delete mappedEvent ;
}
//if its not a multiUse key we are ready
......@@ -117,8 +128,12 @@ void CoreWidget::keyReleaseEvent(QKeyEvent* _e) {
QObject* plugin = (*it).second.first;
KeyBinding binding = getKeyBinding( plugin, (*it).second.second );
//check if its a core Key
if (plugin == 0){
// =================================================================================
// Map event to the cores key and modifier.
// Call the core key handler with the mapped event.
// =================================================================================
QKeyEvent* mappedEvent = new QKeyEvent(_e->type(),binding.key, binding.modifiers,
_e->text(), _e->isAutoRepeat(), _e->count() );
coreKeyReleaseEvent(mappedEvent);
......@@ -136,9 +151,18 @@ void CoreWidget::keyReleaseEvent(QKeyEvent* _e) {
KeyInterface* keyPlugin = qobject_cast< KeyInterface * >(plugin);
if (keyPlugin){
// =================================================================================
// Map event to the plugins key and modifier.
// Call the plugin with the mapped event.
// =================================================================================
QKeyEvent* mappedEvent = new QKeyEvent(_e->type(),binding.key, binding.modifiers,
_e->text(), _e->isAutoRepeat(), _e->count() );
keyPlugin->slotKeyReleaseEvent(mappedEvent);
delete mappedEvent;
}
//if its not a multiUse key we are ready
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment