Without further ado, let's start:
-Version 0.10-rc1 (2014-03-16)
-=============================
+Version 0.11.x (TBD)
+====================
+
+* Full support for Qt 5.2+ in addition to Qt 4.6+
+* Completely revamp the build system, making use of "new" CMake features
+
+Version 0.10.0 (2014-03-25)
+===========================
* Refactor lots of the protocol and connection code
* Introduce connection probing for reliably negotiating protocol features
* Show backlog messages in the Chat Monitor
* Remove SSL protocol selection, always use auto-negotiation for best results
* Highlight rules are now case-insensitive by default
-* New translations
+* New and updated translations
* Bump inxi version (for /sysinfo)
+* Use the raster rendering engine by default on OSX (should improve performance)
-Version 0.9.3 (TBD)
-===================
+Version 0.9.3 (2014-03-25)
+==========================
* Notification fixes
* Improve reliability of SSL connections
return false;
if (currentAccount().isInternal())
return true;
- if (_peer->isLocal())
- return true;
+ if (_authHandler)
+ return _authHandler->isLocal();
+ if (_peer)
+ return _peer->isLocal();
return false;
}
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
+#include <QHostAddress>
+
#include "authhandler.h"
AuthHandler::AuthHandler(QObject *parent)
}
+bool AuthHandler::isLocal() const
+{
+ if (socket()) {
+ if (socket()->peerAddress() == QHostAddress::LocalHost || socket()->peerAddress() == QHostAddress::LocalHostIPv6)
+ return true;
+ }
+ return false;
+}
+
+
// Some errors (e.g. connection refused) don't trigger a disconnected() from the socket, so send this explicitly
// (but make sure it's only sent once!)
void AuthHandler::onSocketError(QAbstractSocket::SocketError error)
QTcpSocket *socket() const;
+ bool isLocal() const;
+
virtual void handle(const Protocol::RegisterClient &) { invalidMessage(); }
virtual void handle(const Protocol::ClientDenied &) { invalidMessage(); }
virtual void handle(const Protocol::ClientRegistered &) { invalidMessage(); }
{
while (socket.canReadLine()) {
QByteArray s = socket.readLine();
- s.chop(2);
+ if (s.endsWith("\r\n"))
+ s.chop(2);
+ else if (s.endsWith("\n"))
+ s.chop(1);
NetworkDataEvent *event = new NetworkDataEvent(EventManager::NetworkIncoming, this, s);
#if QT_VERSION >= 0x040700
event->setTimestamp(QDateTime::currentDateTimeUtc());
_enabled(false),
_nickSuffix(": ")
{
- // use both an Action and generic eventFilter, to make the shortcut configurable
- // yet still be able to reset() when required
+ // This Action just serves as a container for the custom shortcut and isn't actually handled;
+ // apparently, using tab as an Action shortcut in an input widget is unreliable on some platforms (e.g. OS/2)
_lineEdit->installEventFilter(this);
ActionCollection *coll = GraphicalUi::actionCollection("General");
- coll->addAction("TabCompletionKey", new Action(tr("Tab completion"), coll,
+ QAction *a = coll->addAction("TabCompletionKey", new Action(tr("Tab completion"), coll,
this, SLOT(onTabCompletionKey()), QKeySequence(Qt::Key_Tab)));
+ a->setEnabled(false); // avoid catching the shortcut
}
void TabCompleter::onTabCompletionKey()
{
- complete();
+ // do nothing; we use the event filter instead
}
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
- if (keyEvent->key() != GraphicalUi::actionCollection("General")->action("TabCompletionKey")->shortcut()[0]) {
+ if (keyEvent->key() == GraphicalUi::actionCollection("General")->action("TabCompletionKey")->shortcut()[0])
+ complete();
+ else
reset();
- }
+
return false;
}