代码解释!
下面的代码是什么意思啊?
QString AboutPhone::GetKernalVersion()
{
char Buffer[512];
QFilefile("/proc/version");
::snprintf(Buffer,sizeof(Buffer),"%s","2.6.34");
if(file.open(QIODevice::ReadOnly))
{
int read_len;
file.seek(14);
read_len = file.readLine(Buffer,512);
if(read_len > 0)
{
char *ptr = ::strchr(Buffer,'(');
if(ptr)
{
*ptr = 0;
}
}
file.close();
}
return QString(Buffer);
}
QString AboutPhone::GetKernalVersion()
{
char Buffer[512];
QFilefile("/proc/version");
//::snprintf(Buffer,sizeof(Buffer),"%s","2.6.34");
if(file.open(QIODevice::ReadOnly))
{
//int read_len;
file.seek(14);
/*read_len = */file.readLine(Buffer,512);
/*if(read_len > 0)
{
char *ptr = ::strchr(Buffer,'(');
if(ptr)
{
*ptr = 0;
}
}
file.close();*/
}
return QString(Buffer);
}