Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Fix some Compat-Event compile issues
Browse files Browse the repository at this point in the history
  • Loading branch information
scunz committed May 11, 2015
1 parent 05ff85f commit ab92bbd
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 43 deletions.
21 changes: 11 additions & 10 deletions Libs/libMacGitverCore/Widgets/RepoStateWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ RepoStateWidget::RepoStateWidget()
this, &RepoStateWidget::repositoryDeactivated);
}

void RepoStateWidget::repositoryActivated(const RM::Frontend::Repo& info)
void RepoStateWidget::repositoryActivated(const RM::Frontend::Repo& repo)
{
if (repo != info) {
repo = info;
if (mRepo != repo) {
mRepo = repo;
setRepoState();
}
}

void RepoStateWidget::repositoryDeactivated(const RM::Frontend::Repo& info)
void RepoStateWidget::repositoryDeactivated(const RM::Frontend::Repo& repo)
{
if (repo == info) {
repo = RM::Frontend::Repo();
if (mRepo == repo) {
mRepo = RM::Frontend::Repo();
setRepoState();
}
}
Expand All @@ -68,15 +68,16 @@ void RepoStateWidget::setRepoState()
{
txtState->hide();

txtRepo->setText(repo ? repo.displayAlias() : QString());
onUpdateHEAD(repo, RM::Frontend::Reference());
txtRepo->setText(mRepo ? mRepo.displayAlias() : QString());
onUpdateHEAD(RM::Frontend::Reference());
}

void RepoStateWidget::onUpdateHEAD(
const RM::Frontend::Repo& ownerRepo,
const RM::Frontend::Reference& ref)
{
if (ownerRepo != repo) {
RM::Frontend::Repo repo = ref.repository();

if (repo != mRepo) {
return;
}

Expand Down
4 changes: 2 additions & 2 deletions Libs/libMacGitverCore/Widgets/RepoStateWidget.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ private slots:
void setRepoState();

public slots:
void onUpdateHEAD(const RM::Frontend::Repo& ownerRepo, const RM::Frontend::Reference& ref);
void onUpdateHEAD(const RM::Frontend::Reference& ref);

private:
RM::Frontend::Repo repo;
RM::Frontend::Repo mRepo;
QLabel* txtRepo;
QLabel* txtState;
QLabel* txtBranch;
Expand Down
61 changes: 30 additions & 31 deletions Libs/libRepoMan/RepoMan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "libRepoMan/Frontend/Repo.hpp"

#include "libRepoMan/Events/Event.hpp"
#include "libRepoMan/Events/Compat.hpp"

#include <QObject>

Expand All @@ -39,7 +40,7 @@ namespace RM

class REPOMAN_API RepoMan
: public QObject
//, private EventsInterface
, private CompatEventsInterface
{
Q_OBJECT
private:
Expand Down Expand Up @@ -71,42 +72,40 @@ namespace RM
void repositoryClosed();
void hasActiveRepositoryChanged(bool hasActiveRepo);

#ifndef REPOMAN_NO_COMPAT
signals:
void repositoryOpened(const RM::Frontend::Repo& repo);
void repositoryAboutToClose(const RM::Frontend::Repo& repo);
void repositoryActivated(const RM::Frontend::Repo& repo);
void repositoryDeactivated(const RM::Frontend::Repo& repo);
void objectCreated(const RM::Frontend::Repo& repo, const RM::Frontend::Base& object);
void objectAboutToBeDeleted(const RM::Frontend::Repo& repo, const RM::Frontend::Base& object);
void refTreeNodeCreated(const RM::Frontend::Repo& repo, const RM::Frontend::RefTreeNode& node);
void refTreeNodeAboutToBeDeleted(const RM::Frontend::Repo& repo, const RM::Frontend::RefTreeNode& node);
void refCreated(const RM::Frontend::Repo& repo, const RM::Frontend::Reference& ref);
void refAboutToBeDeleted(const RM::Frontend::Repo& repo, const RM::Frontend::Reference& ref);
void refMoved(const RM::Frontend::Repo& repo, const RM::Frontend::Reference& ref);
void refHeadDetached(const RM::Frontend::Repo& repo, const RM::Frontend::Reference& ref);
void tagCreated(const RM::Frontend::Repo& repo, const RM::Frontend::Tag& tag);
void tagAboutToBeDeleted(const RM::Frontend::Repo& repo, const RM::Frontend::Tag& tag);
void branchCreated(const RM::Frontend::Repo& repo, const RM::Frontend::Branch& branch);
void branchAboutToBeDeleted(const RM::Frontend::Repo& repo, const RM::Frontend::Branch& branch);
void branchMoved(const RM::Frontend::Repo& repo, const RM::Frontend::Branch& branch);
void branchUpstreamChanged(const RM::Frontend::Repo& repo, const RM::Frontend::Branch& branch);
void namespaceCreated(const RM::Frontend::Repo& repo, const RM::Frontend::Namespace& nameSpace);
void namespaceAboutToBeDeleted(const RM::Frontend::Repo& repo, const RM::Frontend::Namespace& nameSpace);
void refLogChanged(const RM::Frontend::Repo& repo, const RM::Frontend::RefLog& reflog);
void refLogNewEntry(const RM::Frontend::Repo& repo, const RM::Frontend::RefLog& reflog);
void stageCreated(const RM::Frontend::Repo& repo, const RM::Frontend::Reference& ref);
void stageAboutToBeDeleted(const RM::Frontend::Repo& repo, const RM::Frontend::Reference& ref);
void remoteCreated(const RM::Frontend::Repo& repo, const RM::Frontend::Remote& remote);
void remoteAboutToBeDeleted(const RM::Frontend::Repo& repo, const RM::Frontend::Remote& remote);
void remoteModified(const RM::Frontend::Repo& repo, const RM::Frontend::Remote& remote);
void submoduleCreated(const RM::Frontend::Repo& repo, const RM::Frontend::Submodule& submodule);
void submoduleAboutToBeDeleted(const RM::Frontend::Repo& repo, const RM::Frontend::Submodule& submodule);
void submoduleMoved(const RM::Frontend::Repo& repo, const RM::Frontend::Submodule& submodule);
void objectCreated(const RM::Frontend::Base& object);
void objectAboutToBeDeleted(const RM::Frontend::Base& object);
void refTreeNodeCreated(const RM::Frontend::RefTreeNode& node);
void refTreeNodeAboutToBeDeleted(const RM::Frontend::RefTreeNode& node);
void refCreated(const RM::Frontend::Reference& ref);
void refAboutToBeDeleted(const RM::Frontend::Reference& ref);
void refMoved(const RM::Frontend::Reference& ref);
void refHeadDetached(const RM::Frontend::Reference& ref);
void tagCreated(const RM::Frontend::Tag& tag);
void tagAboutToBeDeleted(const RM::Frontend::Tag& tag);
void branchCreated(const RM::Frontend::Branch& branch);
void branchAboutToBeDeleted(const RM::Frontend::Branch& branch);
void branchMoved(const RM::Frontend::Branch& branch);
void branchUpstreamChanged(const RM::Frontend::Branch& branch);
void namespaceCreated(const RM::Frontend::Namespace& nameSpace);
void namespaceAboutToBeDeleted(const RM::Frontend::Namespace& nameSpace);
void refLogChanged(const RM::Frontend::RefLog& reflog);
void refLogNewEntry(const RM::Frontend::RefLog& reflog);
void stageCreated(const RM::Frontend::Reference& ref);
void stageAboutToBeDeleted(const RM::Frontend::Reference& ref);
void remoteCreated(const RM::Frontend::Remote& remote);
void remoteAboutToBeDeleted(const RM::Frontend::Remote& remote);
void remoteModified(const RM::Frontend::Remote& remote);
void submoduleCreated(const RM::Frontend::Submodule& submodule);
void submoduleAboutToBeDeleted(const RM::Frontend::Submodule& submodule);
void submoduleMoved(const RM::Frontend::Submodule& submodule);
void repositoryStateChanged(const RM::Frontend::Repo& repo);
void indexUpdated(const RM::Frontend::Repo& repo);
void workTreeUpdated(const RM::Frontend::Repo& repo);
#endif
void indexUpdated();
void workTreeUpdated();
};

}

0 comments on commit ab92bbd

Please sign in to comment.