Skip to content

Commit

Permalink
#6438: First slew of changes. sigc::signal<> template arguments are n…
Browse files Browse the repository at this point in the history
…ow using a more modern syntax, like std::function. sigc::mem_fun no longer accepts a raw pointer to bind to the object, use references instead.
  • Loading branch information
codereader committed Jan 13, 2024
1 parent 539891c commit b643407
Show file tree
Hide file tree
Showing 233 changed files with 493 additions and 493 deletions.
4 changes: 2 additions & 2 deletions include/ibrush.h
Expand Up @@ -28,7 +28,7 @@ class IBrushSettings
virtual const Vector3& getSelectedVertexColour() const = 0;
virtual void setSelectedVertexColour(const Vector3& colour) = 0;

virtual sigc::signal<void>& signal_settingsChanged() = 0;
virtual sigc::signal<void()>& signal_settingsChanged() = 0;
};

class BrushCreator :
Expand Down Expand Up @@ -210,7 +210,7 @@ class IFace
virtual void transform(const Matrix4& transformation) = 0;

// Emitted from this IFace's destructor, as last sign of life
virtual sigc::signal<void>& signal_faceDestroyed() = 0;
virtual sigc::signal<void()>& signal_faceDestroyed() = 0;
};

// Plane classification info used by splitting and CSG algorithms
Expand Down
2 changes: 1 addition & 1 deletion include/icameraview.h
Expand Up @@ -93,7 +93,7 @@ class ICameraViewManager :
virtual ICameraView& getActiveView() = 0;

// Signal emitted when any camera position or angles changed
virtual sigc::signal<void>& signal_cameraChanged() = 0;
virtual sigc::signal<void()>& signal_cameraChanged() = 0;
};

}
Expand Down
2 changes: 1 addition & 1 deletion include/iclipboard.h
Expand Up @@ -27,7 +27,7 @@ class IClipboard :
virtual void setString(const std::string& str) = 0;

// A signal that is emitted when the contents of the system clipboard changes
virtual sigc::signal<void>& signal_clipboardContentChanged() = 0;
virtual sigc::signal<void()>& signal_clipboardContentChanged() = 0;
};

}
Expand Down
2 changes: 1 addition & 1 deletion include/icounter.h
Expand Up @@ -39,7 +39,7 @@ class ICounterManager :
// Returns the Counter object of the given type
virtual ICounter& getCounter(CounterType counter) = 0;

virtual sigc::signal<void>& signal_countersChanged() = 0;
virtual sigc::signal<void()>& signal_countersChanged() = 0;
};

inline ICounterManager& GlobalCounters()
Expand Down
6 changes: 3 additions & 3 deletions include/ideclmanager.h
Expand Up @@ -86,7 +86,7 @@ class IDeclaration :

// Fired when this declaration changed (i.e. as result of a reloadDecls
// operation or a change in an editor).
virtual sigc::signal<void>& signal_DeclarationChanged() = 0;
virtual sigc::signal<void()>& signal_DeclarationChanged() = 0;
};

// Factory interface being able to create a single declaration type
Expand Down Expand Up @@ -178,11 +178,11 @@ class IDeclarationManager :
virtual void saveDeclaration(const IDeclaration::Ptr& decl) = 0;

// Signal emitted right before decls are being reloaded
virtual sigc::signal<void>& signal_DeclsReloading(Type type) = 0;
virtual sigc::signal<void()>& signal_DeclsReloading(Type type) = 0;

// Signal emitted when the decls of the given type have been (re-)loaded
// Note that this signal can be fired on an arbitrary thread
virtual sigc::signal<void>& signal_DeclsReloaded(Type type) = 0;
virtual sigc::signal<void()>& signal_DeclsReloaded(Type type) = 0;

// Signal emitted when a declaration is renamed
// The type, the old name and the new name will be passed as arguments
Expand Down
2 changes: 1 addition & 1 deletion include/ieclass.h
Expand Up @@ -139,7 +139,7 @@ class IEntityClass :
virtual Type getClassType() = 0;

/// Signal emitted when entity class contents are changed or reloaded
virtual sigc::signal<void>& changedSignal() = 0;
virtual sigc::signal<void()>& changedSignal() = 0;

/// Get the parent entity class or NULL if there is no parent
virtual IEntityClass* getParent() = 0;
Expand Down
2 changes: 1 addition & 1 deletion include/ieditstopwatch.h
Expand Up @@ -39,7 +39,7 @@ class IMapEditStopwatch :
virtual void setTotalSecondsEdited(unsigned long newValue) = 0;

// Signal emitted when the timer value changes
virtual sigc::signal<void>& sig_TimerChanged() = 0;
virtual sigc::signal<void()>& sig_TimerChanged() = 0;
};

}
Expand Down
2 changes: 1 addition & 1 deletion include/ientity.h
Expand Up @@ -501,7 +501,7 @@ class IEntitySettings
virtual bool getShowEntityAngles() const = 0;
virtual void setShowEntityAngles(bool value) = 0;

virtual sigc::signal<void>& signal_settingsChanged() = 0;
virtual sigc::signal<void()>& signal_settingsChanged() = 0;
};

constexpr const char* const MODULE_ENTITY("EntityModule");
Expand Down
2 changes: 1 addition & 1 deletion include/ifavourites.h
Expand Up @@ -43,7 +43,7 @@ class IFavouritesManager :

// Returns the changed signal for the given type - will be fired when the set changes
// Requesting a signal for an empty typename will trigger a std::invalid_argument exception
virtual sigc::signal<void>& getSignalForType(const std::string& typeName) = 0;
virtual sigc::signal<void()>& getSignalForType(const std::string& typeName) = 0;
};

}
Expand Down
2 changes: 1 addition & 1 deletion include/ifilesystem.h
Expand Up @@ -171,7 +171,7 @@ class VirtualFileSystem :

// A signal that is emitted when the VFS has been initialised, i.e. the paths have been
// set, the archives/directories are known and can be traversed
virtual sigc::signal<void>& signal_Initialised() = 0;
virtual sigc::signal<void()>& signal_Initialised() = 0;

// Returns the number of files in the VFS matching the given filename
virtual int getFileCount(const std::string& filename) = 0;
Expand Down
4 changes: 2 additions & 2 deletions include/ifilter.h
Expand Up @@ -95,10 +95,10 @@ class IFilterSystem :

// Signal emitted when the state of filters has changed,
// filters have been added or removed, or when rules have been altered
virtual sigc::signal<void> filterConfigChangedSignal() const = 0;
virtual sigc::signal<void()> filterConfigChangedSignal() const = 0;

// Signal emitted when filters are added, removed or renamed
virtual sigc::signal<void> filterCollectionChangedSignal() const = 0;
virtual sigc::signal<void()> filterCollectionChangedSignal() const = 0;

/**
* greebo: Updates all the "Filtered" status of all Instances
Expand Down
4 changes: 2 additions & 2 deletions include/igl.h
Expand Up @@ -36,10 +36,10 @@ class ISharedGLContextHolder :
virtual void setSharedContext(const IGLContext::Ptr& context) = 0;

// Fired right after the shared context instance has been registered
virtual sigc::signal<void>& signal_sharedContextCreated() = 0;
virtual sigc::signal<void()>& signal_sharedContextCreated() = 0;

// Fired when the shared context instance has been destroyed
virtual sigc::signal<void>& signal_sharedContextDestroyed() = 0;
virtual sigc::signal<void()>& signal_sharedContextDestroyed() = 0;
};

}
Expand Down
2 changes: 1 addition & 1 deletion include/igrid.h
Expand Up @@ -96,7 +96,7 @@ class IGridManager :
virtual GridLook getMinorLook() const = 0;

/// Signal emitted when the grid is changed
virtual sigc::signal<void> signal_gridChanged() const = 0;
virtual sigc::signal<void()> signal_gridChanged() const = 0;
};

// This is the accessor for the grid module
Expand Down
12 changes: 6 additions & 6 deletions include/igui.h
Expand Up @@ -44,7 +44,7 @@ class IGuiExpression
virtual ValueType evaluate() = 0;

// Value changed signal
virtual sigc::signal<void>& signal_valueChanged() = 0;
virtual sigc::signal<void()>& signal_valueChanged() = 0;
};

// An expression representing a constant value
Expand All @@ -55,7 +55,7 @@ class ConstantExpression :
private:
ValueType _value;

sigc::signal<void> _sigValueChanged;
sigc::signal<void()> _sigValueChanged;

public:
ConstantExpression(const ValueType& value) :
Expand All @@ -68,7 +68,7 @@ class ConstantExpression :
}

// Provide a value changed signal, though it's never invoked
sigc::signal<void>& signal_valueChanged() override
sigc::signal<void()>& signal_valueChanged() override
{
return _sigValueChanged;
}
Expand All @@ -85,13 +85,13 @@ class ConstantExpression :
class IWindowVariable
{
private:
sigc::signal<void> _changedSignal;
sigc::signal<void()> _changedSignal;

public:
virtual ~IWindowVariable() {}

// value-changed signal, to get notified when this value changes
sigc::signal<void>& signal_variableChanged()
sigc::signal<void()>& signal_variableChanged()
{
return _changedSignal;
}
Expand Down Expand Up @@ -306,7 +306,7 @@ class IGui

// Retrieve a changed signal for the given key, which is invoked
// whenever setStateString() is called
virtual sigc::signal<void>& getChangedSignalForState(const std::string& key) = 0;
virtual sigc::signal<void()>& getChangedSignalForState(const std::string& key) = 0;

// Returns the state string "gui::<key>" or an empty string if non-existent
virtual std::string getStateString(const std::string& key) = 0;
Expand Down
8 changes: 4 additions & 4 deletions include/ilayer.h
Expand Up @@ -211,17 +211,17 @@ class ILayerManager
* A signal for client code to get notified about layer creation,
* renamings and removal.
*/
virtual sigc::signal<void> signal_layersChanged() = 0;
virtual sigc::signal<void()> signal_layersChanged() = 0;

/**
* Fired whenever visibility of a layer has been changed.
*/
virtual sigc::signal<void> signal_layerVisibilityChanged() = 0;
virtual sigc::signal<void()> signal_layerVisibilityChanged() = 0;

/**
* Fired whenever a parent of a layer has been changed.
*/
virtual sigc::signal<void> signal_layerHierarchyChanged() = 0;
virtual sigc::signal<void()> signal_layerHierarchyChanged() = 0;

/**
* Public signal to get notified about layer membership changes,
Expand All @@ -230,7 +230,7 @@ class ILayerManager
* without the LayerSystem knowing about this, it is sometimes the
* responsibility of that algorithm code to emit this signal itself.
*/
virtual sigc::signal<void> signal_nodeMembershipChanged() = 0;
virtual sigc::signal<void()> signal_nodeMembershipChanged() = 0;
};

class ILayerModule :
Expand Down
8 changes: 4 additions & 4 deletions include/imap.h
Expand Up @@ -171,7 +171,7 @@ class IMap :
/**
* Signal fired when the name of this map is changing.
*/
virtual sigc::signal<void>& signal_mapNameChanged() = 0;
virtual sigc::signal<void()>& signal_mapNameChanged() = 0;

// Returns true if the map has unsaved changes.
virtual bool isModified() const = 0;
Expand All @@ -182,13 +182,13 @@ class IMap :
/**
* Signal fired when the modified status of this map has changed.
*/
virtual sigc::signal<void>& signal_modifiedChanged() = 0;
virtual sigc::signal<void()>& signal_modifiedChanged() = 0;

// Signal emitted when an operation affecting the map has been undone
virtual sigc::signal<void>& signal_postUndo() = 0;
virtual sigc::signal<void()>& signal_postUndo() = 0;

// Signal emitted when an operation affecting the map has been redone
virtual sigc::signal<void>& signal_postRedo() = 0;
virtual sigc::signal<void()>& signal_postRedo() = 0;

// Accessor to the undo system of the main scene.
// Throws std::runtime_error if no map resource has been loaded.
Expand Down
2 changes: 1 addition & 1 deletion include/imapmerge.h
Expand Up @@ -171,7 +171,7 @@ class IMergeOperation
virtual void setMergeLayers(bool enabled) = 0;

// Signal which is emitted when an action is added to this operation
virtual sigc::signal<void, const IMergeAction::Ptr&>& sig_ActionAdded() = 0;
virtual sigc::signal<void(const IMergeAction::Ptr&)>& sig_ActionAdded() = 0;
};

}
Expand Down
2 changes: 1 addition & 1 deletion include/imodelcache.h
Expand Up @@ -53,7 +53,7 @@ class IModelCache :
virtual void clear() = 0;

/// Signal emitted after models are reloaded
virtual sigc::signal<void> signal_modelsReloaded() = 0;
virtual sigc::signal<void()> signal_modelsReloaded() = 0;
};

} // namespace model
Expand Down
8 changes: 4 additions & 4 deletions include/imodule.h
Expand Up @@ -285,7 +285,7 @@ class IModuleRegistry
/**
* Invoked when all modules have been initialised.
*/
virtual sigc::signal<void>& signal_allModulesInitialised() = 0;
virtual sigc::signal<void()>& signal_allModulesInitialised() = 0;

/**
* Progress function called during module loading and intialisation.
Expand All @@ -301,19 +301,19 @@ class IModuleRegistry
* beginning of the radiant shutdown phase.
* This is a fire-once signal which removes all subscribers after firing.
*/
virtual sigc::signal<void>& signal_modulesUninitialising() = 0;
virtual sigc::signal<void()>& signal_modulesUninitialising() = 0;

/**
* Invoked when all modules have been shut down (i.e. after shutdownModule()).
* This is a fire-once signal which removes all subscribers after firing.
*/
virtual sigc::signal<void>& signal_allModulesUninitialised() = 0;
virtual sigc::signal<void()>& signal_allModulesUninitialised() = 0;

/**
* Invoked right before the module binaries will be unloaded, which will
* trigger the destruction of any static instances in them.
*/
virtual sigc::signal<void>& signal_modulesUnloading() = 0;
virtual sigc::signal<void()>& signal_modulesUnloading() = 0;

// The compatibility level this Registry instance was compiled against.
// Old module registrations will be rejected by the registry anyway,
Expand Down
2 changes: 1 addition & 1 deletion include/imru.h
Expand Up @@ -29,7 +29,7 @@ class IMRUManager :
// Returns the filename of the last opened map, or "" if there doesn't exist one
virtual std::string getLastMapName() = 0;

virtual sigc::signal<void>& signal_MapListChanged() = 0;
virtual sigc::signal<void()>& signal_MapListChanged() = 0;
};

}
Expand Down
4 changes: 2 additions & 2 deletions include/iparticles.h
Expand Up @@ -77,7 +77,7 @@ class IParticleDef :
virtual void swapParticleStages(std::size_t index, std::size_t index2) = 0;

/// Signal emitted when some aspect of the particle def has changed
virtual sigc::signal<void>& signal_changed() = 0;
virtual sigc::signal<void()>& signal_changed() = 0;

// Comparison operator - particle defs are considered equal if all properties (except the name!),
// number of stages and stage contents are the equal
Expand Down Expand Up @@ -155,7 +155,7 @@ class IParticlesManager :
public:

/// Signal emitted when particle definitions are reloaded
virtual sigc::signal<void>& signal_particlesReloaded() = 0;
virtual sigc::signal<void()>& signal_particlesReloaded() = 0;

/// Enumerate each particle def.
virtual void forEachParticleDef(const ParticleDefVisitor&) = 0;
Expand Down
2 changes: 1 addition & 1 deletion include/ipatch.h
Expand Up @@ -261,7 +261,7 @@ class IPatchSettings
virtual const Vector3& getVertexColour(PatchEditVertexType type) const = 0;
virtual void setVertexColour(PatchEditVertexType type, const Vector3& value) = 0;

virtual sigc::signal<void>& signal_settingsChanged() = 0;
virtual sigc::signal<void()>& signal_settingsChanged() = 0;
};

enum class PatchDefType
Expand Down
2 changes: 1 addition & 1 deletion include/iregistry.h
Expand Up @@ -99,7 +99,7 @@ class Registry: public RegisterableModule
virtual void deleteXPath(const std::string& path) = 0;

/// Return a signal which will be emitted when a given key changes
virtual sigc::signal<void> signalForKey(const std::string& key) const = 0;
virtual sigc::signal<void()> signalForKey(const std::string& key) const = 0;
};
typedef std::shared_ptr<Registry> RegistryPtr;

Expand Down
2 changes: 1 addition & 1 deletion include/irender.h
Expand Up @@ -688,7 +688,7 @@ class RenderSystem
virtual void setMergeModeEnabled(bool enabled) = 0;

// Subscription to get notified as soon as the openGL extensions have been initialised
virtual sigc::signal<void> signal_extensionsInitialised() = 0;
virtual sigc::signal<void()> signal_extensionsInitialised() = 0;
};
typedef std::shared_ptr<RenderSystem> RenderSystemPtr;
typedef std::weak_ptr<RenderSystem> RenderSystemWeakPtr;
Expand Down
2 changes: 1 addition & 1 deletion include/irenderableobject.h
Expand Up @@ -30,7 +30,7 @@ class IRenderableObject

// Emitted when the object bounds have changed,
// because it has been either moved or resized.
virtual sigc::signal<void>& signal_boundsChanged() = 0;
virtual sigc::signal<void()>& signal_boundsChanged() = 0;

// Returns the key to access the vertex data in the renderer's geometry store
virtual IGeometryStore::Slot getStorageLocation() = 0;
Expand Down
2 changes: 1 addition & 1 deletion include/iscenegraph.h
Expand Up @@ -75,7 +75,7 @@ class Graph
virtual void removeSceneObserver(Observer* observer) = 0;

/// Accessor for the signal emitted when bounds are changed
virtual sigc::signal<void> signal_boundsChanged() const = 0;
virtual sigc::signal<void()> signal_boundsChanged() const = 0;

/// \brief Invokes all bounds-changed callbacks. Called when the bounds of any instance in the scene change.
/// \todo Move to a separate class.
Expand Down
2 changes: 1 addition & 1 deletion include/iscript.h
Expand Up @@ -67,7 +67,7 @@ class IScriptingSystem :
/**
* Signal fired when the available set of scripts has been reloaded
*/
virtual sigc::signal<void>& signal_onScriptsReloaded() = 0;
virtual sigc::signal<void()>& signal_onScriptsReloaded() = 0;
};
typedef std::shared_ptr<IScriptingSystem> IScriptingSystemPtr;

Expand Down
2 changes: 1 addition & 1 deletion include/iselectionset.h
Expand Up @@ -50,7 +50,7 @@ class ISelectionSetManager
* Signal emitted when the list of selection sets has been changed, by
* deletion or addition.
*/
virtual sigc::signal<void> signal_selectionSetsChanged() const = 0;
virtual sigc::signal<void()> signal_selectionSetsChanged() const = 0;

class Visitor
{
Expand Down

0 comments on commit b643407

Please sign in to comment.