Allow opening databases in read only mode

See issue #325.
This commit is contained in:
Martin Kleusberg
2017-01-15 20:22:01 +01:00
parent d3dde35f90
commit 50ef6cd7c3
5 changed files with 57 additions and 11 deletions
+39
View File
@@ -873,6 +873,7 @@
</widget>
<addaction name="fileNewAction"/>
<addaction name="fileOpenAction"/>
<addaction name="fileOpenReadOnlyAction"/>
<addaction name="fileAttachAction"/>
<addaction name="fileCloseAction"/>
<addaction name="separator"/>
@@ -1993,6 +1994,27 @@
<string>F5</string>
</property>
</action>
<action name="fileOpenReadOnlyAction">
<property name="icon">
<iconset resource="icons/icons.qrc">
<normaloff>:/icons/db_open</normaloff>:/icons/db_open</iconset>
</property>
<property name="text">
<string>&amp;Open Database Read Only...</string>
</property>
<property name="toolTip">
<string>Open an existing database file in read only mode</string>
</property>
<property name="statusTip">
<string>Open an existing database file</string>
</property>
<property name="whatsThis">
<string>This option is used to open an existing database file.</string>
</property>
<property name="menuRole">
<enum>QAction::NoRole</enum>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
@@ -3039,6 +3061,22 @@
</hint>
</hints>
</connection>
<connection>
<sender>fileOpenReadOnlyAction</sender>
<signal>triggered()</signal>
<receiver>MainWindow</receiver>
<slot>fileOpenReadOnly()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>518</x>
<y>314</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>fileOpen()</slot>
@@ -3101,5 +3139,6 @@
<slot>browseDataSetDefaultTableEncoding()</slot>
<slot>browseDataFetchAllData()</slot>
<slot>exportTableToJson()</slot>
<slot>fileOpenReadOnly()</slot>
</slots>
</ui>