Skip to content

Commit

Permalink
F1 to show help; 1 resource file; no lto
Browse files Browse the repository at this point in the history
  • Loading branch information
siavash119 committed Feb 21, 2018
1 parent 1043b45 commit 753bf15
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions icons.qrc → files.qrc
Expand Up @@ -2,5 +2,6 @@
<qresource prefix="/">
<file>icons/icon_22x22.png</file>
<file>icons/icon_64x64.png</file>
<file>readstartup.md</file>
</qresource>
</RCC>
10 changes: 9 additions & 1 deletion mainwindow.cpp
Expand Up @@ -358,6 +358,14 @@ void MainWindow::setShortcuts()
hideNavBar->setShortcutContext(Qt::WidgetWithChildrenShortcut);
connect(hideNavBar,&QAction::triggered,ui->navBar,&QLineEdit::hide,Qt::DirectConnection);
this->addAction(hideNavBar);

QAction *showHelp = new QAction(this);
showHelp->setShortcut(Qt::Key_F1);
showHelp->setShortcutContext(Qt::ApplicationShortcut);
connect(showHelp,&QAction::triggered,[=]{
ui->content->setCurrentIndex(0);
});
this->addAction(showHelp);
}

MainWindow::~MainWindow()
Expand Down Expand Up @@ -582,7 +590,7 @@ void MainWindow::onSelectionChanged()
{
QModelIndexList list = ui->treeView->selected();
if(list.size()) {
QWidget *tab = model->getItem(list.at(0))->tab;
QPointer<QWidget> tab = model->getItem(list.at(0))->tab;
if(tab){
ui->content->setCurrentWidget(tab);
setWindowTitle(tab->windowTitle());
Expand Down
5 changes: 2 additions & 3 deletions qtchan.pro
Expand Up @@ -6,7 +6,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = qtchan
TEMPLATE = app

QMAKE_CXXFLAGS_RELEASE += -O3 -flto
QMAKE_CXXFLAGS_RELEASE += -O3

SOURCES += main.cpp\
mainwindow.cpp \
Expand Down Expand Up @@ -70,5 +70,4 @@ FORMS += mainwindow.ui \
RC_ICONS = icons/icon.ico

RESOURCES += \
icons.qrc \
readme.qrc
files.qrc
5 changes: 0 additions & 5 deletions readme.qrc

This file was deleted.

1 change: 1 addition & 0 deletions readstartup.md
@@ -1,5 +1,6 @@
<p>welcome to <a href="https://github.com/siavash119/qtchan">qtchan</a>. here is some useful info</p>
<ul>
<li>F1 shows this help</li>
<li>ctrl+l opens up the nav bar</li>
<li>you can type g or g/boardnum or /g/ or https://boards.4chan... etc.</li>
<li>g for first page, /g/ for catalog, g/search to get catalog and search</li>
Expand Down

0 comments on commit 753bf15

Please sign in to comment.