Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

The -s and -n options can now be used together. fixes#22 #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mblesel
Copy link

@mblesel mblesel commented Apr 29, 2019

When using the -s and -n options together the -n option was ignored
before.
I added a noNotify argument to the Screenshot::savePathScreenshot
and the MainWindow::savePath functions.
MainWindow::savePath now sets MainWindow::m_noNotify if the program
was called with -n option.
Lastly MainWindow::saveSpecificedPath checks m_noNotify before
sending a notification.

When using the -s and -n options together the -n option was ignored
before.
I added a noNotify argument to the Screenshot::savePathScreenshot
and the MainWindow::savePath functions.
MainWindow::savePath now sets MainWindow::m_noNotify if the program
was called with -n option.
Lastly MainWindow::saveSpecificedPath checks m_noNotify before
sending a notification.
{
m_noNotify = noNotify;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this really necessary?

Copy link
Author

Choose a reason for hiding this comment

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

Either that or you pass it to saveSpecificedPath as an additional argument.
I found this way more consistent with how it is done in noNotify() and in my opinion
the class variable that is supposed to control that no notifications are sent should probably
be set correctly when not sending a notification.
But i guess it doesn't really matter that much.

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean, savePath is the end of the program, you can just use the function parameter without setting m_noNotify here or just use m_noNotify with it set before savePath called, what do you think?

felixonmars added a commit that referenced this pull request Feb 23, 2020
Use a bool everywhere so it works with any other command line options
too.

This addresses #22 and is implemented differently than #60.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants