void
TaintedFlowAnalysisTransfer::transferTaint(TaintedFlowLattice *arg1Lat, TaintedFlowLattice *arg2Lat, TaintedFlowLattice *resLat )
   {
     if (arg1Lat->getLevel() == TaintedFlowLattice::bottom || arg2Lat->getLevel() == TaintedFlowLattice::bottom)
        {
          updateModified(resLat->setLevel(TaintedFlowLattice::bottom));
        }
       else 
        {
       // Both knownValue
          if(arg1Lat->getLevel() == TaintedFlowLattice::taintedValue && arg2Lat->getLevel() == TaintedFlowLattice::taintedValue) 
             {
               updateModified(resLat->setLevel(TaintedFlowLattice::taintedValue));
             }
            else
             {
               if(arg1Lat->getLevel() == TaintedFlowLattice::untaintedValue && arg2Lat->getLevel() == TaintedFlowLattice::untaintedValue) 
                  {
                    updateModified(resLat->setLevel(TaintedFlowLattice::untaintedValue));
                  }
                 else
                  {
                 // Else => Top (mixture of tainted and untained along different paths)
                    updateModified(resLat->setLevel(TaintedFlowLattice::top));
                  }
             }
        }
   }
Beispiel #2
0
void KShortcutsEditorItem::undo()
{
#ifndef NDEBUG
#if 0
    if (m_oldLocalShortcut || m_oldGlobalShortcut || m_oldShapeGesture || m_oldRockerGesture) {
        //qDebug() << "Undoing changes for " << data(Name, Qt::DisplayRole).toString();
    }
#endif
#endif
    if (m_oldLocalShortcut) {
        // We only ever reset the active Shortcut
        m_action->setShortcuts(*m_oldLocalShortcut);
    }

#if HAVE_GLOBALACCEL
    if (m_oldGlobalShortcut) {
        KGlobalAccel::self()->setShortcut(m_action, *m_oldGlobalShortcut, KGlobalAccel::NoAutoloading);
    }
#endif

#if 0
    if (m_oldShapeGesture) {
        KGestureMap::self()->setShapeGesture(m_action, *m_oldShapeGesture);
        KGestureMap::self()->setDefaultShapeGesture(m_action, *m_oldShapeGesture);
    }

    if (m_oldRockerGesture) {
        KGestureMap::self()->setRockerGesture(m_action, *m_oldRockerGesture);
        KGestureMap::self()->setDefaultRockerGesture(m_action, *m_oldRockerGesture);
    }
#endif

    updateModified();
}
Beispiel #3
0
void KShortcutsEditorItem::setRockerGesture(const KRockerGesture &gst)
{
    if (!m_oldRockerGesture) {
        m_oldRockerGesture = new KRockerGesture(gst);
    }
    KGestureMap::self()->setRockerGesture(m_action, gst);
    KGestureMap::self()->setDefaultRockerGesture(m_action, gst);
    updateModified();
}
//! transfer the % operation
void
ConstantPropagationAnalysisTransfer::transferMod(ConstantPropagationLattice *arg1Lat, ConstantPropagationLattice *arg2Lat, ConstantPropagationLattice *resLat)
   {
     if (arg1Lat->getLevel() == ConstantPropagationLattice::bottom || arg2Lat->getLevel() == ConstantPropagationLattice::bottom)
        {
          updateModified(resLat->setLevel(ConstantPropagationLattice::bottom));
        }
       else 
        {
       // Both knownValue
          if(arg1Lat->getLevel() == ConstantPropagationLattice::constantValue && arg2Lat->getLevel() == ConstantPropagationLattice::constantValue) 
             {
               updateModified(resLat->setValue(arg1Lat->getValue() % arg2Lat->getValue()));
             }
            else
             {
            // Else => Top
               updateModified(resLat->setLevel(ConstantPropagationLattice::top));
             }
        }
   }
Beispiel #5
0
void KShortcutsEditorItem::setKeySequence(uint column, const QKeySequence &seq)
{
    QList<QKeySequence> ks;
#if HAVE_GLOBALACCEL
    if (column == GlobalPrimary || column == GlobalAlternate) {
        ks = KGlobalAccel::self()->shortcut(m_action);
        if (!m_oldGlobalShortcut) {
            m_oldGlobalShortcut = new QList<QKeySequence>(ks);
        }
    } else
#endif
    {
        ks = m_action->shortcuts();
        if (!m_oldLocalShortcut) {
            m_oldLocalShortcut = new QList<QKeySequence>(ks);
        }
    }

    if (column == LocalAlternate || column == GlobalAlternate) {
        if (ks.isEmpty()) {
            ks << QKeySequence();
        }

        if (ks.size() <= 1) {
            ks << seq;
        } else {
            ks[1] = seq;
        }
    } else {
        if (ks.isEmpty()) {
            ks << seq;
        } else {
            ks[0] = seq;
        }
    }

    //avoid also setting the default shortcut - what we are setting here is custom by definition
#if HAVE_GLOBALACCEL
    if (column == GlobalPrimary || column == GlobalAlternate) {
        KGlobalAccel::self()->setShortcut(m_action, ks, KGlobalAccel::NoAutoloading);

    } else
#endif
    {
        m_action->setShortcuts(ks);
    }

    updateModified();
}
Beispiel #6
0
void KateUndoManager::redo()
{
  Q_ASSERT(m_editCurrentUndo == 0); // redo is not supported while we care about notifications (call editEnd() first)

  if (redoItems.count() > 0)
  {
    emit redoStart(document());

    redoItems.last()->redo(activeView());
    undoItems.append (redoItems.last());
    redoItems.removeLast ();
    updateModified();

    emit redoEnd(document());
  }
}
Beispiel #7
0
void Kolf::closeGame()
{
	if (game)
	{
		if (game->askSave(true))
			return;
		game->pause();
	}

	filename = QString::null;

	editingEnded();
	delete game;
	game = 0;
	loadedGame = QString::null;

	editingAction->setChecked(false);
	setEditingEnabled(false);
	endAction->setEnabled(false);
	aboutAction->setEnabled(false);
	highScoreAction->setEnabled(false);
	printAction->setEnabled(false);
	saveAction->setEnabled(false);
	saveAsAction->setEnabled(false);
	saveGameAction->setEnabled(false);
	saveGameAsAction->setEnabled(false);
	setHoleMovementEnabled(false);
	setHoleOtherEnabled(false);

	clearHoleAction->setEnabled(false);
	newHoleAction->setEnabled(false);
	newAction->setEnabled(true);
	loadGameAction->setEnabled(true);
	tutorialAction->setEnabled(true);

	titleChanged(QString::null);
	updateModified(false);

	QTimer::singleShot(100, this, SLOT(createSpacer()));
}