conversion to cmake building system #1

Merged
SlavekB merged 1 commits from feat/cmakeConv into master 6 years ago

@ -58,7 +58,7 @@ include( ConfigureChecks.cmake )
###### global compiler settings
add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST )
add_definitions( -DHAVE_CONFIG_H )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )

@ -134,7 +134,7 @@ TdeSudo::TdeSudo(TQWidget *parent, const char *name,const TQString& icon, const
FILE *fout;
char iceauthority[200];
char *host, *auth;
host = tqstrdup(dcopServer);
host = tqstrdup(dcopServer.ascii());
auth = tqstrdup(iceAuth);
int tempfile;
int oldumask = umask(077);
@ -150,8 +150,8 @@ TdeSudo::TdeSudo(TQWidget *parent, const char *name,const TQString& icon, const
}
iceauthorityFile = iceauthority;
//FIXME we should change owner of iceauthority file, but don't have permissions
setenv("ICEAUTHORITY", iceauthorityFile, 1);
setenv("ICEAUTHORITY", iceauthorityFile.local8Bit(), 1);
fout = popen("iceauth >/dev/null 2>&1", "w");
if (!fout) {
kdError() << "error in tdesudo running iceauth" << endl;
@ -191,8 +191,8 @@ TdeSudo::TdeSudo(TQWidget *parent, const char *name,const TQString& icon, const
TQString c = "/usr/bin/xauth -q -f " + m_tmpname + " generate "
+ TQString::fromLocal8Bit(disp) + " . trusted timeout 60";
blockSigChild(); // pclose uses waitpid()
if (!(f = popen(c, "r"))) {
if (!(f = popen(c.local8Bit(), "r"))) {
kdWarning() << k_lineinfo << "Cannot run: " << c << "\n";
unblockSigChild();
return;
@ -251,7 +251,7 @@ TdeSudo::TdeSudo(TQWidget *parent, const char *name,const TQString& icon, const
else if (priority)
{
TQString n = args->getOption("p");
int intn = atoi(n);
int intn = atoi(n.ascii());
intn = (intn * 40 / 100) - (20 + 0.5);
TQString strn;
@ -334,7 +334,7 @@ void TdeSudo::receivedOut(TDEProcess*, char*buffer, int buflen)
pcTmp[buflen]='\0';
TQString strOut(pcTmp);
std::cout << strOut << std::endl;
std::cout << strOut.local8Bit() << std::endl;
static int badpass = 0;

Loading…
Cancel
Save