[X2Go-Commits] [x2goclient] 02/03: remove endl deprecation warnings

git-admin at x2go.org git-admin at x2go.org
Fri Jul 5 08:33:48 CEST 2024


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goclient.

commit f307f618d4ce343d7c51c2c881deb6c9bb527172
Author: Juri Grabowski <x2go at jugra.de>
Date:   Sun Jun 30 14:03:23 2024 +0200

    remove endl deprecation warnings
    
    find src/ -type f -exec sed -i 's/endl/Qt::endl/g' '{}' \;
    git restore src/unixhelper.cpp
---
 src/SVGFrame.cpp            |   4 +-
 src/contest.cpp             |   2 +-
 src/cupsprint.cpp           |   4 +-
 src/help.cpp                |  12 ++--
 src/httpbrokerclient.cpp    |  26 ++++----
 src/onmainwindow.cpp        |  50 +++++++-------
 src/printdialog.cpp         |   4 +-
 src/printwidget.cpp         |   2 +-
 src/pulsemanager.cpp        |  18 ++---
 src/sshmasterconnection.cpp | 156 ++++++++++++++++++++++----------------------
 src/sshprocess.cpp          |  12 ++--
 src/wapi.cpp                |   4 +-
 12 files changed, 147 insertions(+), 147 deletions(-)

diff --git a/src/SVGFrame.cpp b/src/SVGFrame.cpp
index 3b9ca605..3ca6d4c5 100644
--- a/src/SVGFrame.cpp
+++ b/src/SVGFrame.cpp
@@ -60,7 +60,7 @@ SVGFrame::SVGFrame ( QString fname,bool st,QWidget* parent,
 			if ( renderer->animated() )
 			{
 				timer->start ( 1000/renderer->framesPerSecond() );
-				x2goDebug<<"Animated, fps:"<<renderer->framesPerSecond() <<endl;
+				x2goDebug<<"Animated, fps:"<<renderer->framesPerSecond() <<Qt::endl;
 			}
 		}
 	}
@@ -125,7 +125,7 @@ void SVGFrame::mousePressEvent ( QMouseEvent * event )
 			wapiGetBorders ( parentWidget->winId(), vBorder, hBorder, barHeight );
 		x2goDebug<<"svg frame: "<<event->pos() <<
 		":"<<mapFromGlobal ( event->pos() ) <<":"<<barHeight<<":"<<vBorder<<":"
-		<<hBorder<<":"<<pos() <<endl;
+		<<hBorder<<":"<<pos() <<Qt::endl;
 		QMouseEvent * nevent=new QMouseEvent(event->type(), QPoint(0,0),
 				event->button(), event-> buttons(), event->modifiers());
 		QFrame::mousePressEvent ( nevent );
diff --git a/src/contest.cpp b/src/contest.cpp
index acde823b..1d91cbe6 100644
--- a/src/contest.cpp
+++ b/src/contest.cpp
@@ -149,7 +149,7 @@ void ConTest::slotError(QAbstractSocket::SocketError socketError)
     else
         error=socket->errorString();
 
-    x2goDebug<<"Error: "<<error<<endl;
+    x2goDebug<<"Error: "<<error<<Qt::endl;
     timer->stop();
     QPalette pal=lhttps->palette();
     pal.setColor(QPalette::WindowText, Qt::red);
diff --git a/src/cupsprint.cpp b/src/cupsprint.cpp
index 0733b5b9..c9a86ee4 100644
--- a/src/cupsprint.cpp
+++ b/src/cupsprint.cpp
@@ -130,7 +130,7 @@ bool CUPSPrint::setCurrentPrinter ( QString prn )
 	if ( ppdConflicts ( ppd ) !=0 )
 	{
 		x2goDebug<<"There are conflicting options in user settings,\n"
-		"loading defaults"<<endl;
+		"loading defaults"<<Qt::endl;
 		setDefaults();
 	}
 	return true;
@@ -153,7 +153,7 @@ bool CUPSPrint::getOptionValue ( const QString& option,
 	}
 	value=QString::fromLocal8Bit ( choice->choice );
 	valueText=QString::fromLocal8Bit ( choice->text );
-// 	x2goDebug<<"getValue:"<<value<<endl;
+// 	x2goDebug<<"getValue:"<<value<<Qt::endl;
 	return true;
 }
 
diff --git a/src/help.cpp b/src/help.cpp
index 2c5a33ec..8264048a 100644
--- a/src/help.cpp
+++ b/src/help.cpp
@@ -242,11 +242,11 @@ QString help::pretty_print (help::data_t data, bool terminal_output) {
 #endif
   }
 
-  x2goDebug << "Terminal cols: " << terminal_cols << endl;
+  x2goDebug << "Terminal cols: " << terminal_cols << Qt::endl;
 
   for (help::params_t::const_iterator it = data.second.constBegin (); it != data.second.constEnd (); ++it) {
     std::size_t indent = (max_len - (*it).first.size ()) + 4;
-    x2goDebug << "Indent: " << indent << "; max_len: " << max_len << "; param size: " << (*it).first.size () << endl;
+    x2goDebug << "Indent: " << indent << "; max_len: " << max_len << "; param size: " << (*it).first.size () << Qt::endl;
     out << "  ";
     out << (*it).first;
     out << QString (" ").repeated (indent);
@@ -260,7 +260,7 @@ QString help::pretty_print (help::data_t data, bool terminal_output) {
 
     for (QStringList::const_iterator desc_split_it = desc_split.constBegin (); desc_split_it != desc_split.constEnd (); ++desc_split_it) {
       std::size_t cur_len = (*desc_split_it).size ();
-      x2goDebug << "Going to output a description " << (*desc_split_it).size () << " chars wide." << endl;
+      x2goDebug << "Going to output a description " << (*desc_split_it).size () << " chars wide." << Qt::endl;
       if (0 != terminal_cols) {
         /*
          * Only set this the first time right after having written the parameter and indent spaces.
@@ -269,11 +269,11 @@ QString help::pretty_print (help::data_t data, bool terminal_output) {
         if (desc_split_it == desc_split.constBegin ()) {
           remaining = terminal_cols - (indent + (*it).first.size ());
         }
-        x2goDebug << "Still have " << remaining << " characters left on this line." << endl;
+        x2goDebug << "Still have " << remaining << " characters left on this line." << Qt::endl;
 
         /* Ran out of space? That's bad... print a newline and don't use any indentation level. */
         if (0 > remaining) {
-          x2goDebug << "Ran out of space! Will break line and start the description on a new one." << endl;
+          x2goDebug << "Ran out of space! Will break line and start the description on a new one." << Qt::endl;
           out << "\n";
           remaining = terminal_cols;
           indent = 0;
@@ -284,7 +284,7 @@ QString help::pretty_print (help::data_t data, bool terminal_output) {
 
       while (!working_copy.isEmpty ()) {
         cur_len = working_copy.size ();
-        x2goDebug << "Trying to fit a (remaining) description " << cur_len << " characters wide." << endl;
+        x2goDebug << "Trying to fit a (remaining) description " << cur_len << " characters wide." << Qt::endl;
 
         string_split_t string_split;
 
diff --git a/src/httpbrokerclient.cpp b/src/httpbrokerclient.cpp
index 5c1e7a46..fe7773c5 100644
--- a/src/httpbrokerclient.cpp
+++ b/src/httpbrokerclient.cpp
@@ -244,7 +244,7 @@ void HttpBrokerClient::slotSshServerAuthPassphrase(SshMasterConnection* connecti
                                                         ok = true;
                                                         break;
         default:
-                                                        x2goDebug << "Unknown passphrase type requested! Was: " << passphrase_type << endl;
+                                                        x2goDebug << "Unknown passphrase type requested! Was: " << passphrase_type << Qt::endl;
                                                         ok = false;
                                                         break;
     }
@@ -540,7 +540,7 @@ void HttpBrokerClient::createIniFile(const QString& raw_content)
     QString content;
     content = raw_content;
     content.replace("<br>","\n");
-//     x2goDebug<<"Inifile content: "<<content<<endl;
+//     x2goDebug<<"Inifile content: "<<content<<Qt::endl;
     QString cont;
     QStringList lines=content.split("START_USER_SESSIONS\n");
     if (lines.count()>1)
@@ -678,7 +678,7 @@ void HttpBrokerClient::slotConnectionTest(bool success, QString answer, int)
         return;
     if(!sshBroker)
     {
-        x2goDebug<<"Elapsed: "<<requestTime.elapsed()<<"; received:"<<answer.size()<<endl;
+        x2goDebug<<"Elapsed: "<<requestTime.elapsed()<<"; received:"<<answer.size()<<Qt::endl;
         emit connectionTime(requestTime.elapsed(),answer.size());
     }
     return;
@@ -955,23 +955,23 @@ void HttpBrokerClient::slotSslErrors ( QNetworkReply* netReply, const QList<QSsl
 #else
                           cert.issuerInfo ( QSslCertificate::CommonName )
 #endif
-                          <<endl<<
+                          <<Qt::endl<<
                           tr ( "Organization(O)\t" ) <<
 #if QT_VERSION >= 0x050000
                           cert.issuerInfo ( QSslCertificate::Organization ).join("; ")
 #else
                           cert.issuerInfo ( QSslCertificate::Organization )
 #endif
-                          <<endl<<
+                          <<Qt::endl<<
                           tr ( "Organizational Unit(OU)\t" ) <<
 #if QT_VERSION >= 0x050000
                           cert.issuerInfo ( QSslCertificate::OrganizationalUnitName ).join("; ")
 #else
                           cert.issuerInfo ( QSslCertificate::OrganizationalUnitName )
 #endif
-                          <<endl<<
+                          <<Qt::endl<<
                           tr ( "Serial Number\t" ) <<getHexVal ( cert.serialNumber() )
-                          <<endl<<endl<<
+                          <<Qt::endl<<Qt::endl<<
                           tr ( "Issued by:\n" ) <<
                           tr ( "Common Name(CN)\t" ) <<
 #if QT_VERSION >= 0x050000
@@ -979,28 +979,28 @@ void HttpBrokerClient::slotSslErrors ( QNetworkReply* netReply, const QList<QSsl
 #else
                           cert.subjectInfo ( QSslCertificate::CommonName )
 #endif
-                          <<endl<<
+                          <<Qt::endl<<
                           tr ( "Organization(O)\t" ) <<
 #if QT_VERSION >= 0x050000
                           cert.subjectInfo ( QSslCertificate::Organization ).join("; ")
 #else
                           cert.subjectInfo ( QSslCertificate::Organization )
 #endif
-                          <<endl<<
+                          <<Qt::endl<<
                           tr ( "Organizational Unit(OU)\t" ) <<
 #if QT_VERSION >= 0x050000
                           cert.subjectInfo ( QSslCertificate::OrganizationalUnitName ).join("; ")
 #else
                           cert.subjectInfo ( QSslCertificate::OrganizationalUnitName )
 #endif
-                          <<endl<<endl<<
+                          <<Qt::endl<<Qt::endl<<
 
                           tr ( "Validity:\n" ) <<
-                          tr ( "Issued on\t" ) <<cert.effectiveDate().toString() <<endl<<
-                          tr ( "expires on\t" ) <<cert.expiryDate().toString() <<endl<<endl<<
+                          tr ( "Issued on\t" ) <<cert.effectiveDate().toString() <<Qt::endl<<
+                          tr ( "expires on\t" ) <<cert.expiryDate().toString() <<Qt::endl<<Qt::endl<<
                           tr ( "Fingerprints:\n" ) <<
                           tr ( "SHA1\t" ) <<
-                          getHexVal ( cert.digest ( QCryptographicHash::Sha1 ) ) <<endl<<
+                          getHexVal ( cert.digest ( QCryptographicHash::Sha1 ) ) <<Qt::endl<<
                           tr ( "MD5\t" ) <<md5;
 
 
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index b7c82742..25095083 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -1624,7 +1624,7 @@ void ONMainWindow::closeClient()
 
 void ONMainWindow::closeEvent ( QCloseEvent* event )
 {
-    x2goDebug<<"Close event received."<<endl;
+    x2goDebug<<"Close event received."<<Qt::endl;
 
     if (trayNoclose && !brokerMode)
     {
@@ -1648,7 +1648,7 @@ void ONMainWindow::hideEvent(QHideEvent* event)
 
 void ONMainWindow::trayQuit()
 {
-    x2goDebug<<"Quitting from tray icon and closing application."<<endl;
+    x2goDebug<<"Quitting from tray icon and closing application."<<Qt::endl;
 
     closeClient();
     qApp->quit();
@@ -2291,7 +2291,7 @@ void ONMainWindow::slotConfig()
                     bool ret = pulseManager->set_record (!newDisableInput);
 
                     if (!ret) {
-                      x2goDebug << "Failed to change recording status of PulseManager. PulseAudio not started?" << endl;
+                      x2goDebug << "Failed to change recording status of PulseManager. PulseAudio not started?" << Qt::endl;
                     }
                     pulseManager->restart ();
                 }
@@ -3261,7 +3261,7 @@ void ONMainWindow::slotSshServerAuthPassphrase(SshMasterConnection* connection,
                                                         ok = true;
                                                         break;
         default:
-                                                        x2goDebug << "Unknown passphrase type requested! Was: " << passphrase_type << endl;
+                                                        x2goDebug << "Unknown passphrase type requested! Was: " << passphrase_type << Qt::endl;
                                                         ok = false;
                                                         break;
     }
@@ -6253,7 +6253,7 @@ void ONMainWindow::slotTunnelOk(int)
 #endif
     for ( int l=0; l<env.size(); ++l )
     {
-// 		x2goDebug<<env[l]<<endl;
+// 		x2goDebug<<env[l]<<Qt::endl;
 
 #if defined ( Q_OS_WIN ) || defined ( Q_OS_DARWIN )
         if ( env[l].indexOf ( "DISPLAY" ) ==0 )
@@ -6285,7 +6285,7 @@ void ONMainWindow::slotTunnelOk(int)
     {
         env <<"DISPLAY=localhost:"+disp;
 
-        /*		x2goDebug<<"new env DISPLAY"<<"DISPLAY=localhost:"+disp<<endl;*/
+        /*		x2goDebug<<"new env DISPLAY"<<"DISPLAY=localhost:"+disp<<Qt::endl;*/
 
     }
     else
@@ -6293,7 +6293,7 @@ void ONMainWindow::slotTunnelOk(int)
         env[dispInd]="DISPLAY=localhost:"+disp;
 
         /*		x2goDebug<<"existing env DISPLAY("<<dispInd<<
-        		") DISPLAY=localhost:"+disp<<endl;*/
+        		") DISPLAY=localhost:"+disp<<Qt::endl;*/
 
     }
 #endif // Q_OS_WIN
@@ -7062,7 +7062,7 @@ void ONMainWindow::slotShowPassForm()
 {
 #ifdef Q_OS_DARWIN
 //fixes bug, when mainwindow inputs not accepting focus under mac
-    x2goDebug<<"Setting focus."<<endl;
+    x2goDebug<<"Setting focus."<<Qt::endl;
     QTimer::singleShot(500, this, SLOT(setFocus()));
     setFocus();
 #endif
@@ -7741,14 +7741,14 @@ void ONMainWindow::slotReadApplications(bool result, QString output,
             {
                 app.name=QString::fromUtf8(line.split("=")[1].toLatin1());
 
-                //                 x2goDebug<<"local name: "<<app.name<<endl;
+                //                 x2goDebug<<"local name: "<<app.name<<Qt::endl;
 
                 localname=true;
             }
             if (line.indexOf("Comment["+localshort+"]=")!=-1 || line.indexOf("Comment["+locallong+"]=")!=-1)
             {
                 app.comment=QString::fromUtf8(line.split("=")[1].toLatin1());
-                //                 x2goDebug<<"local comment: "<<app.comment<<endl;
+                //                 x2goDebug<<"local comment: "<<app.comment<<Qt::endl;
                 localcomment=true;
             }
             if (line.indexOf("Name=")!=-1 && !localname)
@@ -7758,13 +7758,13 @@ void ONMainWindow::slotReadApplications(bool result, QString output,
                 {
                     if (app.name==autostartApps[i])
                         startAppsFound.append(app.name);
-                    //                 x2goDebug<<"name: "<<app.name<<endl;
+                    //                 x2goDebug<<"name: "<<app.name<<Qt::endl;
                 }
             }
             if (line.indexOf("Comment=")!=-1 && !localcomment)
             {
                 app.comment=line.split("=")[1];
-                //                 x2goDebug<<"comment: "<<app.comment<<endl;
+                //                 x2goDebug<<"comment: "<<app.comment<<Qt::endl;
             }
             if (line.indexOf("Exec=")!=-1)
             {
@@ -7779,7 +7779,7 @@ void ONMainWindow::slotReadApplications(bool result, QString output,
                 {
                     if (app.exec==autostartApps[i])
                         startAppsFound.append(app.exec);
-                    //                 x2goDebug<<"exec: "<<app.exec<<endl;
+                    //                 x2goDebug<<"exec: "<<app.exec<<Qt::endl;
                 }
             }
             if (line.indexOf("Categories=")!=-1)
@@ -9214,7 +9214,7 @@ directory* ONMainWindow::getExpDir ( QString key )
 void ONMainWindow::slotRetExportDir ( bool result,QString output,
                                       int pid)
 {
-    x2goDebug<<"Post-cleanup for startX2goMount triggered."<<endl;
+    x2goDebug<<"Post-cleanup for startX2goMount triggered."<<Qt::endl;
     QString key;
     for ( int i=0; i<exportDir.size(); ++i )
         if ( exportDir[i].pid==pid )
@@ -9227,7 +9227,7 @@ void ONMainWindow::slotRetExportDir ( bool result,QString output,
     if ( result==false )
     {
         QString message=tr ( "<b>Connection failed.</b>\n" ) +output;
-        x2goDebug<<"startX2goMount failed to mount client-side folder, reason: "<<message<<endl;
+        x2goDebug<<"startX2goMount failed to mount client-side folder, reason: "<<message<<Qt::endl;
         if ( message.indexOf ( "publickey,password" ) !=-1 )
         {
             message=tr ( "<b>Wrong password!</b><br><br>" ) +
@@ -9307,7 +9307,7 @@ void ONMainWindow::slotExtTimer()
                  <<"must be"<< ( int ) ( QFile::ReadUser|QFile::WriteUser
                                          |QFile::ExeUser|QFile::ReadOwner|
                                          QFile::WriteOwner|
-                                         QFile::ExeOwner ) <<endl;
+                                         QFile::ExeOwner ) <<Qt::endl;
 
         if ( extLogin )
             extTimer->stop();
@@ -9379,13 +9379,13 @@ void ONMainWindow::slotExportTimer()
     {
 
         x2goDebug<<"Wrong permissions on "<<
-                 readExportsFrom <<":"<<endl;
+                 readExportsFrom <<":"<<Qt::endl;
         x2goDebug<< ( int ) ( QFile::permissions (
                                   readExportsFrom+"/." ) )
                  <<"must be"<< ( int ) ( QFile::ReadUser|QFile::WriteUser
                                          |QFile::ExeUser|QFile::ReadOwner|
                                          QFile::WriteOwner|
-                                         QFile::ExeOwner ) <<endl;
+                                         QFile::ExeOwner ) <<Qt::endl;
         exportTimer->stop();
         return;
     }
@@ -9764,7 +9764,7 @@ void ONMainWindow::slotScDaemonFinished ( int , QProcess::ExitStatus )
 {
     //this should not happen, restart...
     scDaemon=0l;
-    x2goDebug<<"SCDAEMON finished."<<endl;
+    x2goDebug<<"SCDAEMON finished."<<Qt::endl;
     slotStartPGPAuth();
 }
 
@@ -10309,7 +10309,7 @@ void ONMainWindow::slotFsTunnelFailed ( bool result,  QString output,
 
 void ONMainWindow::slotFsTunnelOk(int)
 {
-    x2goDebug<<"FS tunnel through SSH seems to be up and running ..."<<endl;
+    x2goDebug<<"FS tunnel through SSH seems to be up and running ..."<<Qt::endl;
 
     fsTunReady=true;
     //start reverse mounting if RSA Key and FS tunnel are ready
@@ -10504,7 +10504,7 @@ void ONMainWindow::startX2goMount()
         }
     }
 
-    x2goDebug<<"Calling startX2goMount command."<<endl;
+    x2goDebug<<"Calling startX2goMount command."<<Qt::endl;
     dir->pid=sshConnection->executeCommand(cmd,this,SLOT ( slotRetExportDir ( bool,
                                            QString,int) ));
 }
@@ -10892,7 +10892,7 @@ void ONMainWindow::slotCheckXOrgConnection()
                  * Server might still be running here, but deleting the QProcess object
                  * should kill it.
                  */
-                x2goDebug << "Timeout reached waiting for the X.Org Server to open a listening TCP socket." << endl
+                x2goDebug << "Timeout reached waiting for the X.Org Server to open a listening TCP socket." << Qt::endl
                           << "Restarting on higher DISPLAY port. Try count: " << x_start_tries_;
 
                 xorg->terminate ();
@@ -11929,18 +11929,18 @@ void ONMainWindow::slotConfigXinerama()
             intersection=root->screenGeometry(i).intersected(lastDisplayGeometry);
         if (!intersection.isNull())
         {
-            //            x2goDebug<<"intersected with "<<i<<": "<<intersection<<endl;
+            //            x2goDebug<<"intersected with "<<i<<": "<<intersection<<Qt::endl;
             intersection.moveLeft(intersection.x()-lastDisplayGeometry.x());
             intersection.moveTop(intersection.y()-lastDisplayGeometry.y());
 
-            //            x2goDebug<<"xinerama screen: "<<intersection<<endl;
+            //            x2goDebug<<"xinerama screen: "<<intersection<<Qt::endl;
             newXineramaScreens<<intersection;
         }
     }
     if (xineramaScreens != newXineramaScreens)
     {
         xineramaScreens=newXineramaScreens;
-        //        x2goDebug<<"xinerama screen changed, new screens: "<<xineramaScreens<<endl;
+        //        x2goDebug<<"xinerama screen changed, new screens: "<<xineramaScreens<<Qt::endl;
 
         xineramaTimer->stop();
         QStringList screens;
diff --git a/src/printdialog.cpp b/src/printdialog.cpp
index fbe7fee0..35dfda22 100644
--- a/src/printdialog.cpp
+++ b/src/printdialog.cpp
@@ -25,7 +25,7 @@
 PrintDialog::PrintDialog ( QWidget* parent, Qt::WindowFlags f )
 		: QDialog ( parent,f )
 {
-	x2goDebug<<"Starting print dialog."<<endl;
+	x2goDebug<<"Starting print dialog."<<Qt::endl;
 	ui.setupUi ( this );
 	ui.buttonBox->button ( QDialogButtonBox::Ok )->setText (
 	    tr ( "Print" ) );
@@ -44,7 +44,7 @@ PrintDialog::PrintDialog ( QWidget* parent, Qt::WindowFlags f )
 
 PrintDialog::~PrintDialog()
 {
-	x2goDebug<<"Closing print dialog."<<endl;
+	x2goDebug<<"Closing print dialog."<<Qt::endl;
 }
 
 
diff --git a/src/printwidget.cpp b/src/printwidget.cpp
index fd68fe50..4c5801a6 100644
--- a/src/printwidget.cpp
+++ b/src/printwidget.cpp
@@ -118,7 +118,7 @@ void PrintWidget::loadSettings()
 	bool isGsViewInstalled=gsViewInfo ( ver,gsvpath );
 	if ( prcmd=="" && ! ( isGsInstalled && isGsViewInstalled ) )
 	{
-// 		x2goDebug<<"fallback to view"<<endl;
+// 		x2goDebug<<"fallback to view"<<Qt::endl;
 // 		pdfView=true;
 	}
 	else if ( prcmd=="" )
diff --git a/src/pulsemanager.cpp b/src/pulsemanager.cpp
index c960f169..6493e7d1 100644
--- a/src/pulsemanager.cpp
+++ b/src/pulsemanager.cpp
@@ -366,7 +366,7 @@ void PulseManager::fetch_pulseaudio_version () {
     QString stdout_data (ba.constData ());
     QStringList stdout_list (stdout_data.split ("\n"));
 
-    x2goDebug << "pulseaudio --version returned:" << stdout_data << endl;
+    x2goDebug << "pulseaudio --version returned:" << stdout_data << Qt::endl;
 
     bool found = false;
     for (QStringList::const_iterator cit = stdout_list.begin (); (cit != stdout_list.end ()) && (!stop_processing); ++cit) {
@@ -632,16 +632,16 @@ bool PulseManager::generate_server_config () {
       config_tmp_file_stream << " auth-cookie=" + tmp_auth_cookie;
     }
 
-    config_tmp_file_stream << endl;
+    config_tmp_file_stream << Qt::endl;
 
 #ifdef Q_OS_UNIX
-    config_tmp_file_stream << "load-module module-native-protocol-unix" << endl;
-    config_tmp_file_stream << "load-module module-esound-protocol-unix" << endl;
+    config_tmp_file_stream << "load-module module-native-protocol-unix" << Qt::endl;
+    config_tmp_file_stream << "load-module module-esound-protocol-unix" << Qt::endl;
 #endif // defined(Q_OS_UNIX)
 
     config_tmp_file_stream << "load-module module-esound-protocol-tcp port="
                            << QString::number (esd_port_)
-                           << endl;
+                           << Qt::endl;
 
 #ifdef Q_OS_DARWIN
     config_tmp_file_stream << "load-module module-coreaudio-detect";
@@ -665,7 +665,7 @@ bool PulseManager::generate_server_config () {
     else {
       config_tmp_file_stream << "1";
     }
-    config_tmp_file_stream << endl;
+    config_tmp_file_stream << Qt::endl;
 
     QFile config_file (config_file_name);
     if (QFile::exists (config_file_name))
@@ -690,13 +690,13 @@ bool PulseManager::generate_client_config () {
   if (client_config_tmp_file.open ()) {
     QTextStream config_tmp_file_stream (&client_config_tmp_file);
 
-    config_tmp_file_stream << "autospawn=no" << endl;
+    config_tmp_file_stream << "autospawn=no" << Qt::endl;
 #ifdef Q_OS_WIN
-    config_tmp_file_stream << "default-server=localhost:" << pulse_port_ << endl;
+    config_tmp_file_stream << "default-server=localhost:" << pulse_port_ << Qt::endl;
 #endif // defined (Q_OS_WIN)
     config_tmp_file_stream << "daemon-binary="
                            << QDir::toNativeSeparators (QDir (server_binary_).absolutePath ())
-                           << endl;
+                           << Qt::endl;
 
     if (QFile::exists (client_config_file_name))
       QFile::remove (client_config_file_name);
diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index ed18ee76..58367cf2 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -139,8 +139,8 @@ void SshMasterConnection::parseKnownHosts()
         //first element is a type of key, we don't need it
         fields.removeFirst();
         settings.setValue(keyName,fields.join(","));
-        x2goDebug<<"Writing key to registry: HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\SshHostKeys"<<endl;
-        x2goDebug<<keyName<<"="<<fields.join(",")<<endl;
+        x2goDebug<<"Writing key to registry: HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\SshHostKeys"<<Qt::endl;
+        x2goDebug<<keyName<<"="<<fields.join(",")<<Qt::endl;
     }
     settings.sync();
 }
@@ -366,7 +366,7 @@ void SshMasterConnection::checkReverseTunnelConnections()
                 struct sockaddr_in address;
                 address.sin_family=AF_INET;
                 address.sin_port=htons ( req.localPort );
-                x2goDebug<<"Connecting to "<<req.localHost<<":"<<req.localPort<<endl;
+                x2goDebug<<"Connecting to "<<req.localHost<<":"<<req.localPort<<Qt::endl;
 #ifndef Q_OS_WIN
                 inet_aton ( req.localHost.toLatin1(), &address.sin_addr );
 #else
@@ -378,7 +378,7 @@ void SshMasterConnection::checkReverseTunnelConnections()
                 {
                     QString errMsg=tr ( "Cannot connect to " ) +
                                    req.localHost+":"+QString::number ( req.localPort );
-                    x2goDebug<<errMsg<<endl;
+                    x2goDebug<<errMsg<<Qt::endl;
                     emit ioErr ( req.creator, errMsg, "" );
                     break;
                 }
@@ -560,7 +560,7 @@ void SshMasterConnection::run()
     if ( my_ssh_session == NULL )
     {
         QString err=tr ( "Cannot create SSH session." );
-        x2goDebug<<err<<endl;
+        x2goDebug<<err<<Qt::endl;
         emit connectionError ( err,"" );
         quit();
         return;
@@ -595,25 +595,25 @@ void SshMasterConnection::run()
         if (!tcpProxySocket->waitForConnected(30000))
         {
             QString message=tr ( "Cannot connect to proxy server." );
-            x2goDebug<<message<<endl;
+            x2goDebug<<message<<Qt::endl;
             emit connectionError ( "Proxy", message );
             ssh_free ( my_ssh_session );
             quit();
             return;
         }
         proxysocket = tcpProxySocket->socketDescriptor();
-        x2goDebug << "Created HTTP proxy socket: " << proxysocket << endl;
+        x2goDebug << "Created HTTP proxy socket: " << proxysocket << Qt::endl;
         ssh_options_set( my_ssh_session, SSH_OPTIONS_FD, &proxysocket);
         ssh_set_fd_toread( my_ssh_session);
         x2goDebug<<"Connected to HTTP proxy server: " << proxyserver << ":"
-                 << proxyport <<endl;
+                 << proxyport <<Qt::endl;
     }
 
     if ( !sshConnect() )
     {
         if(disconnectSessionFlag)
         {
-            x2goDebug<<"Session is already disconnected, exiting."<<endl;
+            x2goDebug<<"Session is already disconnected, exiting."<<Qt::endl;
             return;
         }
         QString err=ssh_get_error ( my_ssh_session );
@@ -626,7 +626,7 @@ void SshMasterConnection::run()
     }
     if(disconnectSessionFlag)
     {
-        x2goDebug<<"Session is already disconnected, exiting."<<endl;
+        x2goDebug<<"Session is already disconnected, exiting."<<Qt::endl;
         return;
     }
     QString errMsg;
@@ -635,7 +635,7 @@ void SshMasterConnection::run()
     {
         if(disconnectSessionFlag)
         {
-            x2goDebug<<"Session is already disconnected, exiting."<<endl;
+            x2goDebug<<"Session is already disconnected, exiting."<<Qt::endl;
             return;
         }
         writeHostKey=writeHostKeyReady=false;
@@ -660,7 +660,7 @@ void SshMasterConnection::run()
 
     if(disconnectSessionFlag)
     {
-        x2goDebug<<"Session is already disconnected, exiting."<<endl;
+        x2goDebug<<"Session is already disconnected, exiting."<<Qt::endl;
         return;
     }
 
@@ -680,7 +680,7 @@ void SshMasterConnection::run()
     {
         if(disconnectSessionFlag)
         {
-            x2goDebug<<"Session is already disconnected, exiting."<<endl;
+            x2goDebug<<"Session is already disconnected, exiting."<<Qt::endl;
             return;
         }
         x2goDebug<<"User authentication OK.";
@@ -719,7 +719,7 @@ void SshMasterConnection::run()
     {
         if(disconnectSessionFlag)
         {
-            x2goDebug<<"Session is already disconnected, exiting."<<endl;
+            x2goDebug<<"Session is already disconnected, exiting."<<Qt::endl;
             return;
         }
         QString err;
@@ -940,7 +940,7 @@ int SshMasterConnection::serverAuth ( QString& errorMsg )
     if ( 0 >= hlen )
         return SSH_SERVER_ERROR;
 
-    x2goDebug<<"state: "<<state<<endl;
+    x2goDebug<<"state: "<<state<<Qt::endl;
 
     switch ( state )
     {
@@ -1007,9 +1007,9 @@ bool SshMasterConnection::userAuthKeyboardInteractive(QString prompt)
 
             QString name= ssh_userauth_kbdint_getname(my_ssh_session);
             instruction = ssh_userauth_kbdint_getinstruction(my_ssh_session);
-            x2goDebug<<"Have prompts: "<<prompts<<endl;
-            x2goDebug<<"Name: "<<name<<endl;
-            x2goDebug<<"Instruction: "<<instruction<<endl;
+            x2goDebug<<"Have prompts: "<<prompts<<Qt::endl;
+            x2goDebug<<"Name: "<<name<<Qt::endl;
+            x2goDebug<<"Instruction: "<<instruction<<Qt::endl;
         }
         if(prompts>0)
         {
@@ -1082,15 +1082,15 @@ bool SshMasterConnection::userChallengeAuth()
     {
     case SSH_AUTH_INFO:
         prompts=ssh_userauth_kbdint_getnprompts(my_ssh_session);
-        x2goDebug<<"Have prompts: "<<prompts<<endl;
+        x2goDebug<<"Have prompts: "<<prompts<<Qt::endl;
         if(prompts)
         {
             const char *prompt= ssh_userauth_kbdint_getprompt(my_ssh_session,0,NULL);
-            x2goDebug<<"Prompt[0]: |"<<prompt<<"|"<<endl;
+            x2goDebug<<"Prompt[0]: |"<<prompt<<"|"<<Qt::endl;
             QString pr=prompt;
             if(pr.startsWith ("Password:"))
             {
-                x2goDebug<<"Password request"<<endl;
+                x2goDebug<<"Password request"<<Qt::endl;
                 ssh_userauth_kbdint_setanswer(my_ssh_session,0,pass.toLatin1());
                 return userChallengeAuth();
             }
@@ -1100,13 +1100,13 @@ bool SshMasterConnection::userChallengeAuth()
             const std::size_t challenge_auth_code_prompts_size = (sizeof (challenge_auth_code_prompts_)/sizeof (*challenge_auth_code_prompts_));
 
             if (pr.contains ("challenge", Qt::CaseInsensitive)) {
-              x2goDebug << "prompt contains 'challenge': " << pr << endl;
+              x2goDebug << "prompt contains 'challenge': " << pr << Qt::endl;
               has_challenge_auth_code_prompt = true;
               need_to_display_auth_code_prompt = true;
             }
             else {
               for (std::size_t i = 0; i < challenge_auth_code_prompts_size; ++i) {
-                x2goDebug << "Checking against known prompt #" << i << ": " << challenge_auth_code_prompts_[i] << endl;
+                x2goDebug << "Checking against known prompt #" << i << ": " << challenge_auth_code_prompts_[i] << Qt::endl;
 
                 /* Ignore "garbage" at the start of the string, but require at least one line to start with a known prompt. */
                 QStringList tmp_str_list = pr.split ("\n", Qt::SkipEmptyParts);
@@ -1126,7 +1126,7 @@ bool SshMasterConnection::userChallengeAuth()
             }
 
             if (has_challenge_auth_code_prompt) {
-                x2goDebug<<"Verification code request"<<endl;
+                x2goDebug<<"Verification code request"<<Qt::endl;
 
                 challengeAuthPasswordAccepted=true;
                 if(challengeAuthVerificationCode == QString())
@@ -1168,7 +1168,7 @@ bool SshMasterConnection::userChallengeAuth()
             return userChallengeAuth();
         }
     case SSH_AUTH_SUCCESS:
-        x2goDebug<<"Challenge authentication OK."<<endl;
+        x2goDebug<<"Challenge authentication OK."<<Qt::endl;
         return true;
     case SSH_AUTH_DENIED:
         if(!challengeAuthPasswordAccepted )
@@ -1204,22 +1204,22 @@ bool SshMasterConnection::userAuthWithPass()
     int method = ssh_userauth_list(my_ssh_session, NULL);
 
     if (method & SSH_AUTH_METHOD_INTERACTIVE) {
-        x2goDebug << "Challenge authentication requested." << endl;
+        x2goDebug << "Challenge authentication requested." << Qt::endl;
 
         challengeAuthPasswordAccepted = false;
         ret = userChallengeAuth ();
 
         if (!ret) {
-            x2goDebug << "Challenge authentication failed." << endl;
+            x2goDebug << "Challenge authentication failed." << Qt::endl;
         }
     }
 
     if (!ret) {
-        x2goDebug << "Trying password mechanism if available." << endl;
+        x2goDebug << "Trying password mechanism if available." << Qt::endl;
     }
 
     if ((!ret) && (method & SSH_AUTH_METHOD_PASSWORD)) {
-        x2goDebug << "Password mechanism available. Continuing." << endl;
+        x2goDebug << "Password mechanism available. Continuing." << Qt::endl;
 
         QString auth_password = pass;
 
@@ -1248,7 +1248,7 @@ bool SshMasterConnection::userAuthWithPass()
         {
             QString err=ssh_get_error ( my_ssh_session );
             authErrors<<err;
-            x2goDebug << "Password authentication failed: " << err << endl;
+            x2goDebug << "Password authentication failed: " << err << Qt::endl;
         }
         else {
             ret = true;
@@ -1259,7 +1259,7 @@ bool SshMasterConnection::userAuthWithPass()
         /* In case password auth is disabled, make sure the error message is not empty. */
         QString err = ssh_get_error (my_ssh_session);
         authErrors << err;
-        x2goDebug << "Password authentication not available: " << err << endl;
+        x2goDebug << "Password authentication not available: " << err << Qt::endl;
     }
 
     return (ret);
@@ -1304,7 +1304,7 @@ bool SshMasterConnection::userAuthAuto()
     {
         QString err=ssh_get_error ( my_ssh_session );
         authErrors<<err;
-        x2goDebug << "userAuthAuto failed:" << err << " (code " << rc << ")" << endl;
+        x2goDebug << "userAuthAuto failed:" << err << " (code " << rc << ")" << Qt::endl;
         return false;
     }
     return true;
@@ -1504,7 +1504,7 @@ bool SshMasterConnection::userAuthWithKey()
     ssh_string_free(pubkeyStr);
 #endif
 
-    x2goDebug<<"Authenticating with key: "<<rc<<endl;
+    x2goDebug<<"Authenticating with key: "<<rc<<Qt::endl;
 
     if ( autoRemove )
         QFile::remove ( keyName );
@@ -1515,7 +1515,7 @@ bool SshMasterConnection::userAuthWithKey()
         QString err=ssh_get_error ( my_ssh_session );
         authErrors<<err;
 
-        x2goDebug<<"userAuthWithKey failed:" <<err<<endl;
+        x2goDebug<<"userAuthWithKey failed:" <<err<<Qt::endl;
 
         return false;
     }
@@ -1576,7 +1576,7 @@ bool SshMasterConnection::userAuthKrb()
      */
     local_args << shcmd;
 
-    x2goDebug << "Starting ssh:" << local_cmd << " " << local_args.join (" ") << endl;
+    x2goDebug << "Starting ssh:" << local_cmd << " " << local_args.join (" ") << Qt::endl;
     ssh.start (local_cmd, local_args);
 
 
@@ -1584,7 +1584,7 @@ bool SshMasterConnection::userAuthKrb()
     {
         sshProcErrString=ssh.errorString();
         authErrors<<sshProcErrString;
-        x2goDebug<<"SSH start failed:" <<sshProcErrString<<endl;
+        x2goDebug<<"SSH start failed:" <<sshProcErrString<<Qt::endl;
         return false;
     }
     if (!ssh.waitForFinished(20000))
@@ -1592,16 +1592,16 @@ bool SshMasterConnection::userAuthKrb()
         sshProcErrString=ssh.errorString();
         authErrors<<tr("Failed to start SSH client. Please check your installation and GSSApi configuration.");
         authErrors<<sshProcErrString;
-        x2goDebug<<"SSH did not finish:" <<sshProcErrString<<endl;
+        x2goDebug<<"SSH did not finish:" <<sshProcErrString<<Qt::endl;
 
         return false;
     }
     QString outp=ssh.readAllStandardOutput();
     QString err=ssh.readAllStandardError();
     x2goDebug<<"SSH exited.";
-    x2goDebug<<"stdout: "<<outp<<endl;
-    x2goDebug<<"stderr: "<<err<<endl;
-    x2goDebug<<"Exit code: "<<ssh.exitCode()<<"; status: "<<ssh.exitStatus()<<endl;
+    x2goDebug<<"stdout: "<<outp<<Qt::endl;
+    x2goDebug<<"stderr: "<<err<<Qt::endl;
+    x2goDebug<<"Exit code: "<<ssh.exitCode()<<"; status: "<<ssh.exitStatus()<<Qt::endl;
 
     QString begin_marker = "X2GODATABEGIN:"+uuidStr+"\n";
     QString end_marker = "X2GODATAEND:"+uuidStr+"\n";
@@ -1653,14 +1653,14 @@ bool SshMasterConnection::checkLogin()
         QString err = ssh_get_error (my_ssh_session);
         QString error_msg = tr ("%1 failed.").arg ("ssh_channel_new");
 
-        x2goDebug << error_msg.left (error_msg.size () - 1) << ": " << err << endl;
+        x2goDebug << error_msg.left (error_msg.size () - 1) << ": " << err << Qt::endl;
         return false;
     }
     if ( ssh_channel_open_session ( channel ) !=SSH_OK )
     {
         QString err=ssh_get_error ( my_ssh_session );
         QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_open_session");
-        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
+        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<Qt::endl;
         ssh_channel_free(channel);
         return false;
     }
@@ -1668,7 +1668,7 @@ bool SshMasterConnection::checkLogin()
     {
         QString err=ssh_get_error ( my_ssh_session );
         QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_request_pty");
-        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
+        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<Qt::endl;
         ssh_channel_free(channel);
         return false;
     }
@@ -1676,7 +1676,7 @@ bool SshMasterConnection::checkLogin()
     {
         QString err=ssh_get_error ( my_ssh_session );
         QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_change_pty_size");
-        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
+        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<Qt::endl;
         ssh_channel_free(channel);
         return false;
     }
@@ -1684,7 +1684,7 @@ bool SshMasterConnection::checkLogin()
     {
         QString err=ssh_get_error ( my_ssh_session );
         QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_request_exec");
-        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
+        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<Qt::endl;
         ssh_channel_free(channel);
         return false;
     }
@@ -1693,7 +1693,7 @@ bool SshMasterConnection::checkLogin()
         char buffer[1024*512]; //512K buffer
         bool hasInterraction=true;
 	bool interactionStarted=false;
-//         x2goDebug<<"CHECK LOGIN channel created."<<endl;
+//         x2goDebug<<"CHECK LOGIN channel created."<<Qt::endl;
         while (ssh_channel_is_open(channel) &&
                 !ssh_channel_is_eof(channel))
         {
@@ -1838,17 +1838,17 @@ void SshMasterConnection::copy()
         QString dstFile=lst.last();
         lst.removeLast();
         QString dstPath=lst.join ( "/" );
-        x2goDebug<<"SSH Master Connection copy - dst path:"<<dstPath<<" file:"<<dstFile<<endl;
+        x2goDebug<<"SSH Master Connection copy - dst path:"<<dstPath<<" file:"<<dstFile<<Qt::endl;
         ssh_scp scp=ssh_scp_new ( my_ssh_session, SSH_SCP_WRITE|SSH_SCP_RECURSIVE, dstPath.toLatin1() );
         if ( scp == NULL )
         {
-            x2goDebug<<"Error allocating SCP session: "<< ssh_get_error ( my_ssh_session ) <<endl;
+            x2goDebug<<"Error allocating SCP session: "<< ssh_get_error ( my_ssh_session ) <<Qt::endl;
             return;
         }
         int rc = ssh_scp_init ( scp );
         if ( rc != SSH_OK )
         {
-            x2goDebug<<"Error initializing SCP session: "<< ssh_get_error ( my_ssh_session ) <<endl;
+            x2goDebug<<"Error initializing SCP session: "<< ssh_get_error ( my_ssh_session ) <<Qt::endl;
             ssh_scp_free ( scp );
             return;
         }
@@ -1869,7 +1869,7 @@ void SshMasterConnection::copy()
         {
             QString errMsg=tr ( "Cannot create remote file " ) +copyRequests[i].dst;
             QString serr=ssh_get_error ( my_ssh_session );
-            x2goDebug<<errMsg<<" - "<<serr<<endl;
+            x2goDebug<<errMsg<<" - "<<serr<<Qt::endl;
             emit copyErr ( copyRequests[i].creator, errMsg, serr );
             copyRequests.removeAt ( i );
             ssh_scp_close ( scp );
@@ -1881,7 +1881,7 @@ void SshMasterConnection::copy()
         {
             QString serr=ssh_get_error ( my_ssh_session );
             QString errMsg=tr ( "Cannot write to remote file " ) +copyRequests[i].dst;
-            x2goDebug<<errMsg<<" - "<<serr<<endl;
+            x2goDebug<<errMsg<<" - "<<serr<<Qt::endl;
             emit copyErr ( copyRequests[i].creator, errMsg, serr );
             copyRequests.removeAt ( i );
             ssh_scp_close ( scp );
@@ -1889,7 +1889,7 @@ void SshMasterConnection::copy()
             continue;
         }
         emit copyOk ( copyRequests[i].creator );
-        x2goDebug<<"scp ok: "<<copyRequests[i].src<<" -> "<<user<<"@"<<host<<":"<<copyRequests[i].dst<<endl;
+        x2goDebug<<"scp ok: "<<copyRequests[i].src<<" -> "<<user<<"@"<<host<<":"<<copyRequests[i].dst<<Qt::endl;
         copyRequests.removeAt ( i );
         ssh_scp_close ( scp );
         ssh_scp_free ( scp );
@@ -1906,7 +1906,7 @@ void SshMasterConnection::channelLoop()
 
         if ( disconnect )
         {
-            x2goDebug<<"Disconnecting ..."<<endl;
+            x2goDebug<<"Disconnecting ..."<<Qt::endl;
 
             if (useproxy && proxytype==PROXYSSH&&sshProxy)
             {
@@ -1915,22 +1915,22 @@ void SshMasterConnection::channelLoop()
             }
 
             channelConnectionsMutex.lock();
-            x2goDebug<<"Deleting channel connections."<<endl;
+            x2goDebug<<"Deleting channel connections."<<Qt::endl;
             for ( int i=0; i<channelConnections.size(); ++i )
             {
                 finalize ( i );
             }
             channelConnectionsMutex.unlock();
-            x2goDebug<<"Disconnecting session."<<endl;
+            x2goDebug<<"Disconnecting session."<<Qt::endl;
             ssh_disconnect ( my_ssh_session );
             ssh_free ( my_ssh_session );
 
-            x2goDebug<<"Deleting sockets."<<endl;
+            x2goDebug<<"Deleting sockets."<<Qt::endl;
             if (tcpProxySocket != NULL)
                 delete tcpProxySocket;
             if (tcpNetworkProxy != NULL)
                 delete tcpNetworkProxy;
-            x2goDebug<<"All channels closed and session disconnected. Quitting session loop."<<endl;
+            x2goDebug<<"All channels closed and session disconnected. Quitting session loop."<<Qt::endl;
             quit();
             return;
         }
@@ -1988,7 +1988,7 @@ void SshMasterConnection::channelLoop()
             continue;
         }
 
-        //         x2goDebug<<"select exited"<<endl;
+        //         x2goDebug<<"select exited"<<Qt::endl;
 
         channelConnectionsMutex.lock();
         for ( int i=channelConnections.size()-1; i>=0; --i )
@@ -2002,7 +2002,7 @@ void SshMasterConnection::channelLoop()
                 //              x2goDebug<<"read err data from channel\n";
                 nbytes = ssh_channel_read ( channel, buffer, sizeof ( buffer )-1, 1 );
                 emit stdErr ( channelConnections[i].creator, QByteArray ( buffer,nbytes ) );
-                //              x2goDebug<<nbytes<<" err from channel"<<endl;
+                //              x2goDebug<<nbytes<<" err from channel"<<Qt::endl;
             }
             int rez = ssh_channel_poll ( channel, 0 );
             if ( rez==SSH_EOF )
@@ -2015,9 +2015,9 @@ void SshMasterConnection::channelLoop()
             }
             if ( rez>0 )
             {
-                //                  x2goDebug<<"read data from channel "<<channel<<endl;
+                //                  x2goDebug<<"read data from channel "<<channel<<Qt::endl;
                 nbytes = ssh_channel_read ( channel, buffer, sizeof ( buffer )-1, 0 );
-                //                  x2goDebug<<nbytes<<" from channel "<<channel<<endl;
+                //                  x2goDebug<<nbytes<<" from channel "<<channel<<Qt::endl;
                 if ( nbytes > 0 )
                 {
                     if ( tcpSocket>0 )
@@ -2025,12 +2025,12 @@ void SshMasterConnection::channelLoop()
                         if ( send ( tcpSocket,buffer, nbytes,0 ) != nbytes )
                         {
                             QString errMsg=tr ( "Error writing to socket." );
-                            x2goDebug<<"Error writing "<<nbytes<<" to TCP socket"<<tcpSocket<<endl;
+                            x2goDebug<<"Error writing "<<nbytes<<" to TCP socket"<<tcpSocket<<Qt::endl;
                             emit ioErr ( channelConnections[i].creator,errMsg,"" );
                             finalize ( i );
                             continue;
                         }
-                        //                      x2goDebug<<"wrote "<<nbytes<<" to tcp socket "<<tcpSocket<<endl;
+                        //                      x2goDebug<<"wrote "<<nbytes<<" to tcp socket "<<tcpSocket<<Qt::endl;
                     }
                     else
                     {
@@ -2044,7 +2044,7 @@ void SshMasterConnection::channelLoop()
                     QString err=ssh_get_error ( my_ssh_session );
                     QString errorMsg=tr ( "Error reading channel." );
                     emit ioErr ( channelConnections[i].creator, errorMsg, err );
-                    x2goDebug<<errorMsg<<" - "<<err<<endl;
+                    x2goDebug<<errorMsg<<" - "<<err<<Qt::endl;
                     finalize ( i );
                     continue;
                 }
@@ -2065,7 +2065,7 @@ void SshMasterConnection::channelLoop()
             if ( FD_ISSET ( tcpSocket,&rfds ) )
             {
                 nbytes = recv ( tcpSocket, buffer, sizeof ( buffer )-1,0 );
-                //                  x2goDebug<<nbytes<<" bytes from tcp socket "<<tcpSocket<<endl;
+                //                  x2goDebug<<nbytes<<" bytes from tcp socket "<<tcpSocket<<Qt::endl;
                 if ( nbytes > 0 )
                 {
                     if ( ssh_channel_write ( channel, buffer, nbytes ) !=nbytes )
@@ -2073,11 +2073,11 @@ void SshMasterConnection::channelLoop()
                         QString err=ssh_get_error ( my_ssh_session );
                         QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_write");
                         emit ioErr ( channelConnections[i].creator, errorMsg, err );
-                        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
+                        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<Qt::endl;
                         finalize ( i );
                         continue;
                     }
-                    //                      x2goDebug<<nbytes<<" bytes wrote to channel"<<channel<<endl;
+                    //                      x2goDebug<<nbytes<<" bytes wrote to channel"<<channel<<Qt::endl;
                 }
                 if ( nbytes < 0 )
                 {
@@ -2085,13 +2085,13 @@ void SshMasterConnection::channelLoop()
                     QString err="";
                     QString errorMsg=tr ( "Error reading from TCP socket." );
                     emit ioErr ( channelConnections[i].creator, errorMsg, err );
-                    x2goDebug<<errorMsg<<" - "<<err<<endl;
+                    x2goDebug<<errorMsg<<" - "<<err<<Qt::endl;
                     finalize ( i );
                     continue;
                 }
                 if ( nbytes==0 )
                 {
-                    x2goDebug<<"Socket "<<tcpSocket<<" closed."<<endl;
+                    x2goDebug<<"Socket "<<tcpSocket<<" closed."<<Qt::endl;
                     finalize ( i );
                     continue;
                 }
@@ -2110,7 +2110,7 @@ bool SshMasterConnection::createChannelConnection (int i, int &maxsock, fd_set &
         FD_SET ( tcpSocket, &rfds );
     if ( channelConnections.at ( i ).channel==0l )
     {
-        x2goDebug<<"Creating new channel."<<endl;
+        x2goDebug<<"Creating new channel."<<Qt::endl;
         ssh_channel channel = ssh_channel_new ( my_ssh_session );
 
         if (!channel) {
@@ -2119,11 +2119,11 @@ bool SshMasterConnection::createChannelConnection (int i, int &maxsock, fd_set &
             QString error_msg = tr ("%1 failed.").arg ("ssh_channel_new");
             emit ioErr (channelConnections[i].creator, error_msg, err);
 
-            x2goDebug << error_msg.left (error_msg.size () - 1) << ": " << err << endl;
+            x2goDebug << error_msg.left (error_msg.size () - 1) << ": " << err << Qt::endl;
 
             return (false);
         }
-        x2goDebug<<"New channel:"<<channel<<endl;
+        x2goDebug<<"New channel:"<<channel<<Qt::endl;
         channelConnections[i].channel=channel;
         if ( tcpSocket>0 )
         {
@@ -2188,17 +2188,17 @@ bool SshMasterConnection::createChannelConnection (int i, int &maxsock, fd_set &
                     QString err=ssh_get_error ( my_ssh_session );
                     QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_open_forward");
                     emit ioErr ( channelConnections[i].creator, errorMsg, err );
-                    x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
+                    x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<Qt::endl;
                 }
                 else
                 {
-                    x2goDebug<<"New channel forwarded."<<endl;
+                    x2goDebug<<"New channel forwarded."<<Qt::endl;
                 }
             }
         }
         else
         {
-            x2goDebug<<"Executing remote: "<<channelConnections.at ( i ).command<<endl;
+            x2goDebug<<"Executing remote: "<<channelConnections.at ( i ).command<<Qt::endl;
             if ( ssh_channel_open_session ( channel ) !=SSH_OK )
             {
                 QString err=ssh_get_error ( my_ssh_session );
@@ -2208,7 +2208,7 @@ bool SshMasterConnection::createChannelConnection (int i, int &maxsock, fd_set &
                 ssh_channel_free (channel);
 
                 emit ioErr ( channelConnections[i].creator, errorMsg, err );
-                x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
+                x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<Qt::endl;
 
                 return (false);
             }
@@ -2222,14 +2222,14 @@ bool SshMasterConnection::createChannelConnection (int i, int &maxsock, fd_set &
                 ssh_channel_free (channel);
 
                 emit ioErr ( channelConnections[i].creator, errorMsg, err );
-                x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
+                x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<Qt::endl;
 
                 return (false);
             }
             else
             {
                 /* Everything is OK. */
-                x2goDebug<<"New exec channel created."<<endl;
+                x2goDebug<<"New exec channel created."<<Qt::endl;
             }
         }
     }
diff --git a/src/sshprocess.cpp b/src/sshprocess.cpp
index 8ec6d3bc..db663e26 100644
--- a/src/sshprocess.cpp
+++ b/src/sshprocess.cpp
@@ -125,7 +125,7 @@ void SshProcess::tunnelLoop()
     if (serverSocket<=0)
     {
         QString err=tr("Error creating socket.");
-        x2goDebug<<err<<endl;
+        x2goDebug<<err<<Qt::endl;
         emit sshFinished(false,err,pid);
         return;
     }
@@ -143,7 +143,7 @@ void SshProcess::tunnelLoop()
     if (bind(serverSocket,(struct sockaddr*) &address,sizeof(address))!=0)
     {
         QString err=tr("Error binding ")+localHost+":"+QString::number(localPort);
-        x2goDebug<<err<<endl;
+        x2goDebug<<err<<Qt::endl;
         emit sshFinished(false,err,pid);
         return;
     }
@@ -292,7 +292,7 @@ void SshProcess::startNormal(const QString& cmd, bool overridePath)
         {
             stdErrString=proc->errorString();
 #ifdef DEBUG
-            //x2goDebug<<"ssh start failed:" <<stdErrString<<endl;
+            //x2goDebug<<"ssh start failed:" <<stdErrString<<Qt::endl;
 #endif
             slotChannelClosed(this, uuidStr);
             return;
@@ -384,7 +384,7 @@ void SshProcess::start_cp(QString src, QString dst)
 void SshProcess::startTunnel(const QString& forwardHost, uint forwardPort, const QString& localHost,
                              uint localPort, bool reverse)
 {
-    x2goDebug<<"Starting tunnel via SshProcess object "<<pid<<": "<<forwardHost<<":"<<forwardPort<<" -> "<<localHost<<":"<<localPort<<endl;
+    x2goDebug<<"Starting tunnel via SshProcess object "<<pid<<": "<<forwardHost<<":"<<forwardPort<<" -> "<<localHost<<":"<<localPort<<Qt::endl;
 
     tunnel=true;
     tunnelOkEmited=false;
@@ -439,7 +439,7 @@ void SshProcess::slotStdErr(SshProcess* creator, QByteArray data)
     if (creator!=this)
         return;
 #ifdef DEBUG
-//     x2goDebug<<"new err data:"<<data<<endl;
+//     x2goDebug<<"new err data:"<<data<<Qt::endl;
 #endif
     stdErrString+=data;
 
@@ -464,7 +464,7 @@ void SshProcess::slotStdOut(SshProcess* creator, QByteArray data)
 {
     if (creator!=this)
         return;
-//     x2goDebug<<"new data"<<data<<endl;
+//     x2goDebug<<"new data"<<data<<Qt::endl;
     stdOutString+=data;
 }
 
diff --git a/src/wapi.cpp b/src/wapi.cpp
index d32b2bf7..bc38439e 100644
--- a/src/wapi.cpp
+++ b/src/wapi.cpp
@@ -247,10 +247,10 @@ void wapiSetWindowIcon ( HWND wnd, const QPixmap& icon)
     x2goDebug<<"Small icon: "<<smallIcon<<smallx<<"x"<<smally;
     int rez=SetClassLong(wnd,GCL_HICON, (LONG)largeIcon);
     if (!rez)
-        x2goDebug<<"ERROR: "<<GetLastError()<<endl;
+        x2goDebug<<"ERROR: "<<GetLastError()<<Qt::endl;
     rez=SetClassLong(wnd,GCL_HICONSM,(LONG)smallIcon);
     if (!rez)
-        x2goDebug<<"ERROR: "<<GetLastError()<<endl;
+        x2goDebug<<"ERROR: "<<GetLastError()<<Qt::endl;
     /*    ShowWindow(wnd, SW_HIDE);
         ShowWindow(wnd, SW_SHOW);*/
 }

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list