Comments (4)
You do have a point. I also just realised that this would change the way the path
property would behave, and I would like to avoid that.
So instead, we could either:
- Change the method to take an optional argument, as already suggested by you:
QString QPathEdit::path(bool queryInvalid = false) const
. This would not change default behaviour, since the argument is defaulted. - Add a new method for this purpouse:
QString QPathEdit::editPath() const
. This would return the path as currently visible in the text edit, no matter it's validity.
I personally would prefer the 2. variant, as we could keep binary compability this way. Also I personally think having two seperate methods makes it clearer how the result of the two could differ.
from qpathedit.
I totally agree with you. I would suggest a method like this: QString QPathEdit::path(bool *pathValid = nullptr) const
. Feel free to create a pull request with that change if you want to get it done quickly.
from qpathedit.
Ok, but what is the point behind the pointer argument type? The validity of the returned path could be checked by checking the emptiness of the returned path or the bool hasAcceptableInput()
method could be used for this purpose as well.
from qpathedit.
I prefer the 2. variant too, PR submitted.
from qpathedit.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qpathedit.