Skip to content

Make more instance variables private.#929

Merged
ahmedcharles merged 4 commits intoMudlet:developmentfrom
ahmedcharles:private
Apr 20, 2017
Merged

Make more instance variables private.#929
ahmedcharles merged 4 commits intoMudlet:developmentfrom
ahmedcharles:private

Conversation

@ahmedcharles
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Member

@SlySven SlySven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As well as some comments being miss-placed; won't this reordering of the members in the class b****rmess-up the initialisation list in the Constructor?

src/EAction.h Outdated
signals:
void triggered(QAction*);

public://private:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this make them private?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't. Making them private now requires more changes. This is effectively a TODO.

Copy link
Copy Markdown
Member

@SlySven SlySven Apr 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open the comment with TODO: that is one of the default terms that the Qt Creator "Todo-list" plug-in tracks and indexes and can jump you with a click:

qt_snapshot7

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

// What the user has set as their preference
bool mIsCurrentLogFileInHtmlFormat;

// What the current file will use, set from the previous
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this one (before lines 218 to 224 inclusive) refers to: mIsCurrentLogFileInHtmlFormat.

src/Host.h Outdated
bool mPrintCommand;
QString mPrompt;

// The following was incorrectly called mRawStreamDump
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment really refers to BOTH of the next two members - and explains why and how the original member's functions was spilt.

src/Host.h Outdated
@@ -215,24 +188,9 @@ class Host : public QObject
// What the user has set as their preference
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This refers to the first one: mIsNextLogFileInHtmlFormat.

src/Host.h Outdated
int mPort;
QString mPrompt;

// What the current file will use, set from the previous
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of place - see prior comment

@ahmedcharles
Copy link
Copy Markdown
Contributor Author

Just curious, what's with the b****r? I'm not sure I get it.

@ahmedcharles
Copy link
Copy Markdown
Contributor Author

I removed the commentary on phpBB, etc. That's a completely new feature, so perhaps we should open an issue or forum thread. I'd prefer comments that are TODO/FIXME to be things that are 'wrong' with the current implementation rather than just random ideas about how things could be some day.

// To cover the corner case of the user changing the mode
// whilst a log is being written, this stores the mode of
// the next log file. See mIsCurrentLogFileInHtmlFormat.
bool mIsNextLogFileInHtmlFormat;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested revised text:

// To cover the corner case of the user changing the mode
// whilst a log is being written, this stores the mode of
// future logs file as set in the profile preferences. See
// also mIsCurrentLogFileInHtmlFormat.

// To cover the corner case of the user changing the mode
// whilst a log is being written, this stores the mode of
// the current log file. See mIsNextLogFileInHtmlFormat.
bool mIsCurrentLogFileInHtmlFormat;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested revised text:

// To cover the corner case of the user changing the mode
// whilst a log is being written, this stores the mode of
// the current log file and is set from
// mIsNextLogFileInHtmlFormat at the point that a log is started.

@SlySven
Copy link
Copy Markdown
Member

SlySven commented Apr 20, 2017

Ok with the phpBB comment stuff going away - it is an idea that is so far down my task list that it is in danger of being compressed so much it might turn into a precious stone... 🔹 😀

<off-topic>b****r is slang from some parts of the UK and when used in conjunction with -up has a meaning in the same general direction as fubar. Despite this Wiktionary entry describing the term as having no sexual overtones - there is actually a linkage of the obscured word to a certain practice that was made legal in mainland Britain only 50 years ago and which could cause offence in some quarters.</off-top>

Copy link
Copy Markdown
Member

@SlySven SlySven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it compiles cleanly - and that pointer does not need to be set, then it is OK! 👍

mpHost->mpMap->mpM = mpMapper->glWidget;
mpHost->mpMap->mpHost = mpHost;
mpHost->mpMap->mpMapper = mpMapper;
mpMapper->mpHost = mpHost;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not needed because it is done by the dlgMapper constructor? 😕

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct.

@@ -117,7 +119,6 @@ public slots:

GLfloat rotTri, rotQuad;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two for the 🗑️ BTW.

@ahmedcharles ahmedcharles merged commit a1cab6b into Mudlet:development Apr 20, 2017
@ahmedcharles ahmedcharles deleted the private branch April 20, 2017 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants