You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When opening files on the C drive, backslashes are changed to forward slashes, but on the D drive, backslashes are maintained.
After using DB4S for a while now, I've kinda gotten used to files having forward slashes - guessed it was part of the 'cross OS' style-ness of the program. However, tonight I realised it was only doing it for certain files?
Just wondered if this 'inconsistency' was a bug more than a quirk....
It is only a cosmetic thing, and has no impact on the program.
Actually, just thought and realised the ones on the C drive have been created and opened, while the ones on the D drive have been created previously, so just opened. Its still a bug/issue ... albeit a very very minor cosmetic one! 😉
And in the main caption of the window (as per the 2nd and 3rd screenshots...)
It has no performance/program knock-on affects, but is just 'odd' when you look at it. I guess its just some parsing done in one part thats squiffy. (Thats a technical term just below 'bug', but I don't think you have a label for that!)
With the first screenshot, it should be fairly trivial to fix. If we throw in a regex or similar to replace slashes in the filename string with the correct one for the platform, I think that would do the trick:
// Add shortcut for opening the file using the keyboard. However, if the
application is configured to store
// more than nine recently opened files don't set shortcuts for the later
ones which wouldn't be single digit anymore.
if(i < 9)
recentFileActs[i]->setShortcut(QKeySequence(Qt::CTRL + (Qt::Key_1+i)));
... surely that should be if(i<10).... or if(i<=9)....... as the
ninth entry isn't being shortcutted.
@chrisjlocke Can you try the new commit I have just pushed? It's completely untested because I don't have a Windows system, so I'm wondering if it does the job 😉
Activity
chrisjlocke commentedon Aug 18, 2016
Actually, just thought and realised the ones on the C drive have been created and opened, while the ones on the D drive have been created previously, so just opened. Its still a bug/issue ... albeit a very very minor cosmetic one! 😉
justinclift commentedon Aug 18, 2016
With the back and forward slashes, is that just in the "Recent Files" list thing?
chrisjlocke commentedon Aug 19, 2016
And in the main caption of the window (as per the 2nd and 3rd screenshots...)
It has no performance/program knock-on affects, but is just 'odd' when you look at it. I guess its just some parsing done in one part thats squiffy. (Thats a technical term just below 'bug', but I don't think you have a label for that!)
justinclift commentedon Aug 19, 2016
Heh Heh Heh
Ahhh yeah, I use "wonky". Same kind of thing. 😁
With the first screenshot, it should be fairly trivial to fix. If we throw in a regex or similar to replace slashes in the filename string with the correct one for the platform, I think that would do the trick:
https://github.com/sqlitebrowser/sqlitebrowser/blob/master/src/MainWindow.cpp#L1240-L1241
Updating the window title will probably use the same regex, applying it to the filename here:
https://github.com/sqlitebrowser/sqlitebrowser/blob/master/src/MainWindow.cpp#L1257-L1262
chrisjlocke commentedon Aug 19, 2016
Interesting snippet of code there.
// Add shortcut for opening the file using the keyboard. However, if the
application is configured to store
// more than nine recently opened files don't set shortcuts for the later
ones which wouldn't be single digit anymore.
if(i < 9)
recentFileActs[i]->setShortcut(QKeySequence(Qt::CTRL + (Qt::Key_1+i)));
... surely that should be if(i<10).... or if(i<=9)....... as the
ninth entry isn't being shortcutted.
I can't test it, as my proggy only goes up to 5.
[image: Inline image 1]
Unsure how to set that higher....
justinclift commentedon Aug 19, 2016
That's a good first thought. 😄
Looking at the initialisation for
ithough, it's starting out at 0. So<=9would be 10 values, which would be too many.chrisjlocke commentedon Aug 19, 2016
Doh. Didn't look at that. Oops.
justinclift commentedon Aug 19, 2016
You're trying, that's the important thing. 😄
chrisjlocke commentedon Aug 20, 2016
Thats what my wife says. I'm very trying... I'm not too sure its a compliment when she says it... 😉
justinclift commentedon Apr 11, 2017
@MKleusberg Do you have a few moments to knock together a quick patch to use the correct platform specific slashes?
Pretty sure this'll be super easy. 😄
Show consistent slashes in recent files menu actions
MKleusberg commentedon May 3, 2017
@justinclift I can try 😃
@chrisjlocke Can you try the new commit I have just pushed? It's completely untested because I don't have a Windows system, so I'm wondering if it does the job 😉
justinclift commentedon May 4, 2017
@chrisjlocke Ping? 😁
chrisjlocke commentedon May 5, 2017
The file list history now has the correct backslashes (didn't before), but the window caption doesn't.
Use platform specific path separators in window caption
MKleusberg commentedon May 5, 2017
Thanks! Should be fixed with the last commit 😃
MKleusberg commentedon May 8, 2017
@chrisjlocke Is it working for you? 😃
chrisjlocke commentedon May 8, 2017
Working brilliantly now, thank you! 🍨