Skip to content

Commit f3955c3

Browse files
annejanJanosch Knack
authored and
Janosch Knack
committed
Don't attempt to open file when deselected on secondary treeview click, fixes IJHack#221
1 parent fab11a5 commit f3955c3

24 files changed

+1123
-1102
lines changed

deselectabletreeview.h

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,40 @@
11
#ifndef DESELECTABLETREEVIEW_H
22
#define DESELECTABLETREEVIEW_H
3-
/* taken from http://stackoverflow.com/questions/2761284/ thanks to Yassir Ennazk */
43
#include "QTreeView"
54
#include "QMouseEvent"
65
#include "QDebug"
76
#include "mainwindow.h"
87

8+
/**
9+
* @brief The DeselectableTreeView class
10+
* taken from http://stackoverflow.com/questions/2761284/ thanks to Yassir Ennazk
11+
*/
912
class DeselectableTreeView : public QTreeView
1013
{
1114
Q_OBJECT
1215

1316
public:
17+
/**
18+
* @brief DeselectableTreeView standard constructor
19+
* @param parent
20+
*/
1421
DeselectableTreeView(QWidget *parent) : QTreeView(parent) {}
22+
/**
23+
* @brief ~DeselectableTreeView standard destructor
24+
*/
1525
virtual ~DeselectableTreeView() {}
1626

1727
signals:
28+
/**
29+
* @brief emptyClicked event
30+
*/
1831
void emptyClicked();
1932

2033
private:
34+
/**
35+
* @brief mousePressEvent now deselects on second click
36+
* @param event
37+
*/
2138
virtual void mousePressEvent(QMouseEvent *event)
2239
{
2340
QModelIndex item = indexAt(event->pos());

localization/localization_ar_MA.ts

+50-50
Original file line numberDiff line numberDiff line change
@@ -465,14 +465,14 @@ Expire-Date: 0
465465
<message>
466466
<location filename="../mainwindow.ui" line="72"/>
467467
<location filename="../mainwindow.ui" line="75"/>
468-
<location filename="../mainwindow.cpp" line="1796"/>
468+
<location filename="../mainwindow.cpp" line="1797"/>
469469
<source>Edit</source>
470470
<translation type="unfinished"></translation>
471471
</message>
472472
<message>
473473
<location filename="../mainwindow.ui" line="90"/>
474474
<location filename="../mainwindow.ui" line="93"/>
475-
<location filename="../mainwindow.cpp" line="1808"/>
475+
<location filename="../mainwindow.cpp" line="1809"/>
476476
<source>Delete</source>
477477
<translation type="unfinished"></translation>
478478
</message>
@@ -503,7 +503,7 @@ Expire-Date: 0
503503
</message>
504504
<message>
505505
<location filename="../mainwindow.ui" line="179"/>
506-
<location filename="../mainwindow.cpp" line="1790"/>
506+
<location filename="../mainwindow.cpp" line="1791"/>
507507
<source>Users</source>
508508
<translation type="unfinished"></translation>
509509
</message>
@@ -579,13 +579,13 @@ p, li { white-space: pre-wrap; }
579579
<translation type="unfinished"></translation>
580580
</message>
581581
<message>
582-
<location filename="../mainwindow.cpp" line="1836"/>
582+
<location filename="../mainwindow.cpp" line="1837"/>
583583
<source>New Folder:
584584
(Will be placed in %1 )</source>
585585
<translation type="unfinished"></translation>
586586
</message>
587587
<message>
588-
<location filename="../mainwindow.cpp" line="825"/>
588+
<location filename="../mainwindow.cpp" line="826"/>
589589
<source>Password hidden</source>
590590
<translation type="unfinished"></translation>
591591
</message>
@@ -600,197 +600,197 @@ p, li { white-space: pre-wrap; }
600600
<translation type="unfinished"></translation>
601601
</message>
602602
<message>
603-
<location filename="../mainwindow.cpp" line="829"/>
603+
<location filename="../mainwindow.cpp" line="830"/>
604604
<source>Content hidden</source>
605605
<translation type="unfinished"></translation>
606606
</message>
607607
<message>
608-
<location filename="../mainwindow.cpp" line="917"/>
608+
<location filename="../mainwindow.cpp" line="918"/>
609609
<source>Clipboard cleared</source>
610610
<translation type="unfinished"></translation>
611611
</message>
612612
<message>
613-
<location filename="../mainwindow.cpp" line="919"/>
613+
<location filename="../mainwindow.cpp" line="920"/>
614614
<source>Clipboard not cleared</source>
615615
<translation type="unfinished"></translation>
616616
</message>
617617
<message>
618-
<location filename="../mainwindow.cpp" line="932"/>
618+
<location filename="../mainwindow.cpp" line="933"/>
619619
<source>Password and Content hidden</source>
620620
<translation type="unfinished"></translation>
621621
</message>
622622
<message>
623-
<location filename="../mainwindow.cpp" line="984"/>
623+
<location filename="../mainwindow.cpp" line="985"/>
624624
<source>QProcess::FailedToStart</source>
625625
<translation type="unfinished"></translation>
626626
</message>
627627
<message>
628-
<location filename="../mainwindow.cpp" line="987"/>
628+
<location filename="../mainwindow.cpp" line="988"/>
629629
<source>QProcess::Crashed</source>
630630
<translation type="unfinished"></translation>
631631
</message>
632632
<message>
633-
<location filename="../mainwindow.cpp" line="990"/>
633+
<location filename="../mainwindow.cpp" line="991"/>
634634
<source>QProcess::Timedout</source>
635635
<translation type="unfinished"></translation>
636636
</message>
637637
<message>
638-
<location filename="../mainwindow.cpp" line="993"/>
638+
<location filename="../mainwindow.cpp" line="994"/>
639639
<source>QProcess::ReadError</source>
640640
<translation type="unfinished"></translation>
641641
</message>
642642
<message>
643-
<location filename="../mainwindow.cpp" line="996"/>
643+
<location filename="../mainwindow.cpp" line="997"/>
644644
<source>QProcess::WriteError</source>
645645
<translation type="unfinished"></translation>
646646
</message>
647647
<message>
648-
<location filename="../mainwindow.cpp" line="999"/>
648+
<location filename="../mainwindow.cpp" line="1000"/>
649649
<source>QProcess::UnknownError</source>
650650
<translation type="unfinished"></translation>
651651
</message>
652652
<message>
653-
<location filename="../mainwindow.cpp" line="1047"/>
653+
<location filename="../mainwindow.cpp" line="1048"/>
654654
<source>Looking for: %1</source>
655655
<translation type="unfinished"></translation>
656656
</message>
657657
<message>
658-
<location filename="../mainwindow.cpp" line="719"/>
659-
<location filename="../mainwindow.cpp" line="1185"/>
660-
<location filename="../mainwindow.cpp" line="1361"/>
661-
<location filename="../mainwindow.cpp" line="2034"/>
658+
<location filename="../mainwindow.cpp" line="720"/>
659+
<location filename="../mainwindow.cpp" line="1186"/>
660+
<location filename="../mainwindow.cpp" line="1362"/>
661+
<location filename="../mainwindow.cpp" line="2038"/>
662662
<source>Can not edit</source>
663663
<translation type="unfinished"></translation>
664664
</message>
665665
<message>
666-
<location filename="../mainwindow.cpp" line="1186"/>
667-
<location filename="../mainwindow.cpp" line="2035"/>
666+
<location filename="../mainwindow.cpp" line="1187"/>
667+
<location filename="../mainwindow.cpp" line="2039"/>
668668
<source>Could not read encryption key to use, .gpg-id file missing or invalid.</source>
669669
<translation type="unfinished"></translation>
670670
</message>
671671
<message>
672-
<location filename="../mainwindow.cpp" line="1232"/>
673-
<location filename="../mainwindow.cpp" line="1835"/>
672+
<location filename="../mainwindow.cpp" line="1233"/>
673+
<location filename="../mainwindow.cpp" line="1836"/>
674674
<source>New file</source>
675675
<translation type="unfinished"></translation>
676676
</message>
677677
<message>
678-
<location filename="../mainwindow.cpp" line="1256"/>
678+
<location filename="../mainwindow.cpp" line="1257"/>
679679
<source>Delete password?</source>
680680
<translation type="unfinished"></translation>
681681
</message>
682682
<message>
683-
<location filename="../mainwindow.cpp" line="1257"/>
684-
<location filename="../mainwindow.cpp" line="1285"/>
683+
<location filename="../mainwindow.cpp" line="1258"/>
684+
<location filename="../mainwindow.cpp" line="1286"/>
685685
<source>Are you sure you want to delete %1?</source>
686686
<translation type="unfinished"></translation>
687687
</message>
688688
<message>
689-
<location filename="../mainwindow.cpp" line="1284"/>
689+
<location filename="../mainwindow.cpp" line="1285"/>
690690
<source>Delete folder?</source>
691691
<translation type="unfinished"></translation>
692692
</message>
693693
<message>
694-
<location filename="../mainwindow.cpp" line="720"/>
695-
<location filename="../mainwindow.cpp" line="1362"/>
694+
<location filename="../mainwindow.cpp" line="721"/>
695+
<location filename="../mainwindow.cpp" line="1363"/>
696696
<source>Selected password file does not exist, not able to edit</source>
697697
<translation type="unfinished"></translation>
698698
</message>
699699
<message>
700-
<location filename="../mainwindow.cpp" line="865"/>
701-
<location filename="../mainwindow.cpp" line="2077"/>
700+
<location filename="../mainwindow.cpp" line="866"/>
701+
<location filename="../mainwindow.cpp" line="2081"/>
702702
<source>Password</source>
703703
<translation type="unfinished"></translation>
704704
</message>
705705
<message>
706-
<location filename="../mainwindow.cpp" line="1233"/>
706+
<location filename="../mainwindow.cpp" line="1234"/>
707707
<source>New password file:
708708
(Will be placed in %1 )</source>
709709
<translation type="unfinished"></translation>
710710
</message>
711711
<message>
712-
<location filename="../mainwindow.cpp" line="1429"/>
712+
<location filename="../mainwindow.cpp" line="1430"/>
713713
<source>Can not get key list</source>
714714
<translation type="unfinished"></translation>
715715
</message>
716716
<message>
717-
<location filename="../mainwindow.cpp" line="1430"/>
717+
<location filename="../mainwindow.cpp" line="1431"/>
718718
<source>Unable to get list of available gpg keys</source>
719719
<translation type="unfinished"></translation>
720720
</message>
721721
<message>
722-
<location filename="../mainwindow.cpp" line="1461"/>
722+
<location filename="../mainwindow.cpp" line="1462"/>
723723
<source>Key not found in keyring</source>
724724
<translation type="unfinished"></translation>
725725
</message>
726726
<message>
727-
<location filename="../mainwindow.cpp" line="1496"/>
727+
<location filename="../mainwindow.cpp" line="1497"/>
728728
<source>Cannot update</source>
729729
<translation type="unfinished"></translation>
730730
</message>
731731
<message>
732-
<location filename="../mainwindow.cpp" line="1497"/>
732+
<location filename="../mainwindow.cpp" line="1498"/>
733733
<source>Failed to open .gpg-id for writing.</source>
734734
<translation type="unfinished"></translation>
735735
</message>
736736
<message>
737-
<location filename="../mainwindow.cpp" line="1510"/>
737+
<location filename="../mainwindow.cpp" line="1511"/>
738738
<source>Check selected users!</source>
739739
<translation type="unfinished"></translation>
740740
</message>
741741
<message>
742-
<location filename="../mainwindow.cpp" line="1511"/>
742+
<location filename="../mainwindow.cpp" line="1512"/>
743743
<source>None of the selected keys have a secret key available.
744744
You will not be able to decrypt any newly added passwords!</source>
745745
<translation type="unfinished"></translation>
746746
</message>
747747
<message>
748-
<location filename="../mainwindow.cpp" line="1604"/>
748+
<location filename="../mainwindow.cpp" line="1605"/>
749749
<source>Generating GPG key pair</source>
750750
<translation type="unfinished"></translation>
751751
</message>
752752
<message>
753-
<location filename="../mainwindow.cpp" line="1649"/>
753+
<location filename="../mainwindow.cpp" line="1650"/>
754754
<source>Profile changed to %1</source>
755755
<translation type="unfinished"></translation>
756756
</message>
757757
<message>
758-
<location filename="../mainwindow.cpp" line="1788"/>
758+
<location filename="../mainwindow.cpp" line="1789"/>
759759
<source>Add folder</source>
760760
<translation type="unfinished"></translation>
761761
</message>
762762
<message>
763-
<location filename="../mainwindow.cpp" line="1789"/>
763+
<location filename="../mainwindow.cpp" line="1790"/>
764764
<source>Add password</source>
765765
<translation type="unfinished"></translation>
766766
</message>
767767
<message>
768-
<location filename="../mainwindow.cpp" line="1906"/>
768+
<location filename="../mainwindow.cpp" line="1907"/>
769769
<source>No characters chosen</source>
770770
<translation type="unfinished"></translation>
771771
</message>
772772
<message>
773-
<location filename="../mainwindow.cpp" line="1907"/>
773+
<location filename="../mainwindow.cpp" line="1908"/>
774774
<source>Can&apos;t generate password, there are no characters to choose from set in the configuration!</source>
775775
<translation type="unfinished"></translation>
776776
</message>
777777
<message>
778-
<location filename="../mainwindow.cpp" line="1926"/>
778+
<location filename="../mainwindow.cpp" line="1927"/>
779779
<source>Timed out</source>
780780
<translation type="unfinished"></translation>
781781
</message>
782782
<message>
783-
<location filename="../mainwindow.cpp" line="1927"/>
783+
<location filename="../mainwindow.cpp" line="1928"/>
784784
<source>Can&apos;t start process, previous one is still running!</source>
785785
<translation type="unfinished"></translation>
786786
</message>
787787
<message>
788-
<location filename="../mainwindow.cpp" line="1962"/>
788+
<location filename="../mainwindow.cpp" line="1966"/>
789789
<source>Copied to clipboard</source>
790790
<translation type="unfinished"></translation>
791791
</message>
792792
<message>
793-
<location filename="../mainwindow.cpp" line="1976"/>
793+
<location filename="../mainwindow.cpp" line="1980"/>
794794
<source>Re-encrypting from folder %1</source>
795795
<translation type="unfinished"></translation>
796796
</message>

0 commit comments

Comments
 (0)