

Definition at line 75 of file main.cpp.
Signals | |
| void | showLinkRequest (const QString &) |
Public Member Functions | |
| AssistantSocket (int sock, QObject *parent=0) | |
| ~AssistantSocket () | |
Private Slots | |
| void | readClient () |
| void | connectionClosed () |
| AssistantSocket::AssistantSocket | ( | int | sock, | |
| QObject * | parent = 0 | |||
| ) |
Definition at line 109 of file main.cpp.
References QObject::connect(), connectionClosed(), QAbstractSocket::disconnected(), readClient(), QIODevice::readyRead(), QAbstractSocket::setSocketDescriptor(), SIGNAL, and SLOT.
00110 : QTcpSocket( parent ) 00111 { 00112 connect( this, SIGNAL(readyRead()), SLOT(readClient()) ); 00113 connect( this, SIGNAL(disconnected()), SLOT(connectionClosed()) ); 00114 setSocketDescriptor( sock ); 00115 }
Here is the call graph for this function:

| void AssistantSocket::showLinkRequest | ( | const QString & | ) | [signal] |
Referenced by readClient().
| void AssistantSocket::readClient | ( | ) | [private, slot] |
Definition at line 117 of file main.cpp.
References QFileInfo::absoluteFilePath(), QAbstractSocket::canReadLine(), emit, QString::isNull(), QIODevice::readLine(), QString::replace(), and showLinkRequest().
Referenced by AssistantSocket().
00118 { 00119 QString link = QString(); 00120 while ( canReadLine() ) 00121 link = readLine(); 00122 if ( !link.isNull() ) { 00123 link = link.replace(QLatin1String("\n"), QLatin1String("")); 00124 link = link.replace(QLatin1String("\r"), QLatin1String("")); 00125 QFileInfo fi(link); 00126 link = fi.absoluteFilePath(); 00127 emit showLinkRequest( link ); 00128 } 00129 }
| void AssistantSocket::connectionClosed | ( | ) | [private, slot] |
Definition at line 131 of file main.cpp.
References QObject::deleteLater().
Referenced by AssistantSocket().
00132 { 00133 deleteLater(); 00134 }
1.5.1