[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdesvn] src/svnqt: Replace custom copy/assignment operators with default ones - the classes have no
From: Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date: 2016-10-09 13:16:16
Message-ID: E1btDxg-0003lJ-E3 () code ! kde ! org
[Download RAW message or body]
Git commit 4b70f0175c29795d634c27e76bac138a2717fcf9 by Christian Ehrlicher.
Committed on 09/10/2016 at 11:14.
Pushed by chehrlic into branch 'master'.
Replace custom copy/assignment operators with default ones - the classes have no \
pointers and therefore the compiler can generate those operators by themself
M +5 -4 src/svnqt/context.h
M +0 -12 src/svnqt/datetime.cpp
M +0 -13 src/svnqt/datetime.h
M +0 -33 src/svnqt/info_entry.cpp
M +0 -1 src/svnqt/info_entry.h
M +2 -0 src/svnqt/path.h
M +0 -5 src/svnqt/revision.cpp
M +0 -7 src/svnqt/revision.h
M +5 -3 src/svnqt/svnstream.h
http://commits.kde.org/kdesvn/4b70f0175c29795d634c27e76bac138a2717fcf9
diff --git a/src/svnqt/context.h b/src/svnqt/context.h
index 30f3613..59944ee 100644
--- a/src/svnqt/context.h
+++ b/src/svnqt/context.h
@@ -79,6 +79,11 @@ public:
virtual ~Context();
/**
+ * disable assignment operator
+ */
+ Context &operator = (const Context &) = delete;
+
+ /**
* enable/disable authentication caching
*
* @param value true=enable/false=disable
@@ -169,10 +174,6 @@ public:
private:
ContextData *m;
- /**
- * disable assignment operator
- */
- Context &operator = (const Context &);
};
}
diff --git a/src/svnqt/datetime.cpp b/src/svnqt/datetime.cpp
index f9bcbdc..b73b046 100644
--- a/src/svnqt/datetime.cpp
+++ b/src/svnqt/datetime.cpp
@@ -52,23 +52,11 @@ DateTime::DateTime(const QDateTime &dt)
{
}
-DateTime::DateTime(const DateTime &dateTime)
- : m_time(dateTime.m_time)
-{
-}
-
DateTime::DateTime(const QString &dt)
{
SetRFC822Date(dt.toUtf8().constData());
}
-DateTime &
-DateTime::operator =(const DateTime &dateTime)
-{
- m_time = dateTime.m_time;
- return *this;
-}
-
bool DateTime::operator<(const DateTime &dateTime)const
{
return m_time < dateTime.m_time;
diff --git a/src/svnqt/datetime.h b/src/svnqt/datetime.h
index c5335aa..5c84ba2 100644
--- a/src/svnqt/datetime.h
+++ b/src/svnqt/datetime.h
@@ -78,19 +78,6 @@ public:
*/
DateTime(const QString &dt); //krazy:exclude=explicit
- /**
- * Copy constructor
- *
- * @param dateTime Source
- */
- DateTime(const DateTime &dateTime);
-
- /**
- * @param dateTime Source
- */
- DateTime &
- operator =(const DateTime &dateTime);
-
bool
operator<(const DateTime &dateTime)const;
bool
diff --git a/src/svnqt/info_entry.cpp b/src/svnqt/info_entry.cpp
index df2d7d9..37aac53 100644
--- a/src/svnqt/info_entry.cpp
+++ b/src/svnqt/info_entry.cpp
@@ -368,36 +368,3 @@ void svn::InfoEntry::init(const svn_info_t *item, const QString \
&path) }
}
#endif
-
-svn::InfoEntry::InfoEntry(const InfoEntry &other)
-{
- m_name = other.m_name;
- m_last_changed_date = other.m_last_changed_date;
- m_text_time = other.m_text_time;
- m_prop_time = other.m_prop_time;
- m_Lock = other.m_Lock;
- m_checksum = other.m_checksum;
-#if SVN_API_VERSION >= SVN_VERSION_CHECK(1,7,0)
- m_conflicts = other.m_conflicts;
-#else
- m_conflict_new = other.m_conflict_new;
- m_conflict_old = other.m_conflict_old;
- m_conflict_wrk = other.m_conflict_wrk;
-#endif
- m_copyfrom_url = other.m_copyfrom_url;
- m_last_author = other.m_last_author;
- m_prejfile = other.m_prejfile;
- m_repos_root = other.m_repos_root;
- m_url = other.m_url;
- m_UUID = other.m_UUID;
- m_kind = other.m_kind;
- m_copy_from_rev = other.m_copy_from_rev;
- m_last_changed_rev = other.m_last_changed_rev;
- m_revision = other.m_revision;
- m_hasWc = other.m_hasWc;
- m_schedule = other.m_schedule;
- m_size = other.m_size;
- m_working_size = other.m_working_size;
- m_changeList = other.m_changeList;
- m_depth = other.m_depth;
-}
diff --git a/src/svnqt/info_entry.h b/src/svnqt/info_entry.h
index 012f6ee..7d03f3a 100644
--- a/src/svnqt/info_entry.h
+++ b/src/svnqt/info_entry.h
@@ -58,7 +58,6 @@ public:
InfoEntry(const svn_info_t *, const char *path);
InfoEntry(const svn_info_t *, const QString &path);
#endif
- InfoEntry(const InfoEntry &);
~InfoEntry();
#if SVN_API_VERSION >= SVN_VERSION_CHECK(1,7,0)
diff --git a/src/svnqt/path.h b/src/svnqt/path.h
index 16279d8..d3633dc 100644
--- a/src/svnqt/path.h
+++ b/src/svnqt/path.h
@@ -72,6 +72,8 @@ public:
*/
Path(const Path &path);
+ ~Path() = default;
+
/**
* Assignment operator
*/
diff --git a/src/svnqt/revision.cpp b/src/svnqt/revision.cpp
index 707a312..02d013c 100644
--- a/src/svnqt/revision.cpp
+++ b/src/svnqt/revision.cpp
@@ -132,11 +132,6 @@ Revision::Revision(const QDateTime &dateTime)
assign(dateTime);
}
-Revision::Revision(const Revision &revision)
-{
- init(revision.revision());
-}
-
void
Revision::init(const svn_opt_revision_t *revision)
{
diff --git a/src/svnqt/revision.h b/src/svnqt/revision.h
index b1d7fe9..9cbf75a 100644
--- a/src/svnqt/revision.h
+++ b/src/svnqt/revision.h
@@ -153,13 +153,6 @@ public:
Revision(const QDateTime &dateTime); //krazy:exclude=explicit
/**
- * Copy constructor
- *
- * @param revision Source
- */
- Revision(const Revision &revision); //krazy:exclude=explicit
-
- /**
* @return revision information
*/
const svn_opt_revision_t *
diff --git a/src/svnqt/svnstream.h b/src/svnqt/svnstream.h
index 6e8d283..5dbabcf 100644
--- a/src/svnqt/svnstream.h
+++ b/src/svnqt/svnstream.h
@@ -26,7 +26,7 @@
#include "svnqt/svnqt_defines.h"
-#include <qstring.h>
+#include <QString>
#include <svn_io.h>
struct svn_client_ctx_t;
@@ -47,6 +47,10 @@ class SVNQT_EXPORT SvnStream
{
friend class SvnStream_private;
public:
+ /* disable default contructor */
+ SvnStream() = delete;
+ Q_DISABLE_COPY(SvnStream)
+
//! Constructor
/*!
* Setup a svn_stream_t and holds a required pool. The stream will freed
@@ -116,8 +120,6 @@ protected:
private:
SvnStream_private *m_Data;
- /* disable default contructor */
- SvnStream();
};
//! a class let subversion print into a QByteArray
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic