diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index fd3f9123..a91d7867 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -101,7 +101,7 @@ void MainWindow::init() ui->actionExecuteSql->setShortcuts(shortcuts); QShortcut* shortcutBrowseRefresh = new QShortcut(QKeySequence("Ctrl+R"), this); - QObject::connect(shortcutBrowseRefresh, SIGNAL(activated()), ui->buttonRefresh, SLOT(click())); + connect(shortcutBrowseRefresh, SIGNAL(activated()), ui->buttonRefresh, SLOT(click())); // Create the actions for the recently opened dbs list for(int i = 0; i < MaxRecentFiles; ++i) { @@ -214,7 +214,7 @@ void MainWindow::init() { // Check for a new release version, usually only enabled on windows m_NetworkManager = new QNetworkAccessManager(this); - QObject::connect(m_NetworkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(httpresponse(QNetworkReply*))); + connect(m_NetworkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(httpresponse(QNetworkReply*))); QUrl url("https://raw.githubusercontent.com/sqlitebrowser/sqlitebrowser/master/currentrelease"); m_NetworkManager->get(QNetworkRequest(url)); diff --git a/src/sqltextedit.cpp b/src/sqltextedit.cpp index 789d63ca..915f2dd9 100644 --- a/src/sqltextedit.cpp +++ b/src/sqltextedit.cpp @@ -50,6 +50,9 @@ SqlTextEdit::SqlTextEdit(QWidget* parent) : // Do rest of initialisation reloadSettings(); + + // Connect signals + connect(this, SIGNAL(linesChanged()), this, SLOT(updateLineNumberAreaWidth())); } SqlTextEdit::~SqlTextEdit() @@ -132,7 +135,6 @@ void SqlTextEdit::reloadSettings() setMarginsFont(marginsfont); setMarginLineNumbers(0, true); setMarginsBackgroundColor(Qt::lightGray); - connect(this, SIGNAL(linesChanged()), this, SLOT(updateLineNumberAreaWidth())); updateLineNumberAreaWidth(); // Highlight current line